`<bit>`: Should emit rbit, clz on ARM64 for `countr_zero`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.2k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
Right now countr_zero falls back to software on arm, this could be improved to emit rbit followed by clz. (alternatively countr_zero_fallback could call countl_zero instead of _Countl_zero_fallback see https://github.com/microsoft/STL/pull/795#discussion_r445676597 for more details.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the implementation for countr_zero and trace its ARM fallback path. Compare the existing fallback with the linked discussion about calling countl_zero, and verify the intended ARM64 instruction sequence is rbit followed by clz. Done means countr_zero no longer uses the software fallback on ARM64 and the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100