Skip to content

Use mi_popcount in _mi_commit_mask_committed_size#1298

Open
cppcoffee wants to merge 1 commit into
microsoft:mainfrom
cppcoffee:use-mi-popcount
Open

Use mi_popcount in _mi_commit_mask_committed_size#1298
cppcoffee wants to merge 1 commit into
microsoft:mainfrom
cppcoffee:use-mi-popcount

Conversation

@cppcoffee
Copy link
Copy Markdown

Replace the bit-by-bit loop with the existing mi_popcount() helper as noted by the inline TODO comment. This compiles to a single hardware instruction (popcnt/cnt) on modern x86_64 and ARM64.

Replace the bit-by-bit loop with the existing mi_popcount() helper
as noted by the inline TODO comment. This compiles to a single
hardware instruction (popcnt/cnt) on modern x86_64 and ARM64.

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant