Nothing Special   »   [go: up one dir, main page]

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

Improve performance of HashBuckets using bit operation #84

Open
samchon opened this issue Dec 19, 2020 · 0 comments
Open

Improve performance of HashBuckets using bit operation #84

samchon opened this issue Dec 19, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@samchon
Copy link
Owner
samchon commented Dec 19, 2020

Change the hash buckets not to using the mod (%) operator but the bitwise and (&) operator . If size of the hash buckets always be multiple of 2, the ^ operation can replace the % operation and it can reduce elapsed time about 10 percent.

Modulo and Division vs Bitwise Operations

https://mziccard.me/2015/05/08/modulo-and-division-vs-bitwise-operations/

@samchon samchon added the enhancement New feature or request label Dec 19, 2020
@samchon samchon self-assigned this Dec 19, 2020
samchon pushed a commit that referenced this issue Dec 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant