Skip to content

Optimize count-leading-zero routines #591

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

calc84maniac
Copy link
Contributor

Use a logarithmic search to count leading zeros instead of using shift loops, dramatically reducing runtime when there are many leading zeros. Consolidated the routines for each integer type into a single source file due to their interdependencies.

Also, fix ez80_builtin function definitions to provide the same return type as their corresponding compiler built-ins, and optimize some routines to use count-leading-zeros instead of popcount.

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

Successfully merging this pull request may close these issues.

2 participants