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

Fast conversion #61

Open
make-github-pseudonymous-again opened this issue May 9, 2020 · 2 comments
Open

Fast conversion #61

make-github-pseudonymous-again opened this issue May 9, 2020 · 2 comments

Comments

@make-github-pseudonymous-again
Copy link
Member

Conversion can still be fast when bases have a common power. A bit of shifting needs to be done but this is pretty similar to the fast conversion methods already implemented.

@make-github-pseudonymous-again
Copy link
Member Author

Seems difficult to test for that... We could restrict to powers of two only.

@make-github-pseudonymous-again
Copy link
Member Author

Testing for powers of two can be done very fast with (f & (f-1)) && (t & (t-1)). Then number of bits per limb can be found with https://stackoverflow.com/a/7813486/1582182.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant