Skip to content

Improve performance of HashBuckets using bit operation #84

@samchon

Description

@samchon

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/

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions