Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A better algorithm for ctz #550

Open
wants to merge 7 commits into
base: devel
Choose a base branch
from
Open

Conversation

shscp
Copy link

@shscp shscp commented Apr 28, 2021

x*2^k equivalent to x<<k . Construct a number 0x07C4ACDD, it have a features: when it left shift 0, left shift 1... left shift 31, it‘s most 5 significant bits just take all numbers from 0 to 31.

x*2^k equivalent to x<<k . Construct a number 0x0xFB5CA62, it have a features: when it left shift 0, left shift 1... left shift 31, it‘s most 5 significant bit just take all numbers from 0 to 31.
Avoided branches in lfs_npw2()
@geky geky changed the base branch from master to devel June 11, 2021 00:45
@geky geky added the needs ci ci is probably broken label Jun 11, 2021
@geky
Copy link
Member

geky commented Jun 11, 2021

Hmmm, the next step would be to run the CI benchmarks to see if this is worth taking in, but it seems CI doesn't want to run on this PR for some reason... debugging...

@geky geky added needs investigation no idea what is wrong performance and removed needs investigation no idea what is wrong labels Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs ci ci is probably broken performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants