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

Consider to implement bitVector using []byte to further reduce bits per key overhead #11

Open
meling opened this issue Sep 30, 2023 · 1 comment
Labels
performance Can possibly improve performance

Comments

@meling
Copy link
Member

meling commented Sep 30, 2023

We could replace the []uint64 bit vector implementation we currently use with a []byte implementation. This can save up to 7 bytes per bit vector in unlucky cases, where the bit vector must use one additional uint64 when the vector's size isn't divisible by 64.

Note, however, that initial experiments with a []byte implementation seem to indicate that it is slightly slower to call bv.Set(). I have not tested it in BBHash.

We should benchmark the two implementations and compare them.

@meling
Copy link
Member Author

meling commented Sep 30, 2023

We could consider letting the bit vector implementation be decided at compile time via generics. We would need a different implementation of words() to allow this.

@meling meling added the performance Can possibly improve performance label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Can possibly improve performance
Projects
None yet
Development

No branches or pull requests

1 participant