Commit 496817f
Optimize BitfieldUnit get/set with byte-wise operations
Replace bit-at-a-time loops in get(), set(), raw_get(), and raw_set()
with byte-wise shift/mask operations. This significantly improves
performance for multi-bit field access.
The new implementation reads/writes bytes in chunks and uses shifts
and masks to extract/insert values, rather than iterating over each
bit individually.
For big-endian targets, the algorithm reverses bits within bytes and
the final value to maintain the same semantics as the original
implementation.1 parent 7c38446 commit 496817f
42 files changed
Lines changed: 4489 additions & 1431 deletions
File tree
- bindgen-tests/tests/expectations/tests
- bindgen/codegen
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 106 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 106 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments