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

Switch to xxHash for Bloom filters; add convenience overload for trace_refs_recursive. #173

Merged
merged 5 commits into from
Nov 7, 2024

Conversation

tonyastolfi
Copy link
Collaborator

xxHash is empirically superior to std::hash and boost::hash in terms of both speed and quality.

https://github.com/Cyan4973/xxHash?tab=readme-ov-file#xxhash---extremely-fast-hash-algorithm

This PR adds a dependency on Conan Center's xxhash package and switches the LLFS Bloom Filter implementation to use it. We add another 32 random seeds for hash functions, for a total of up to 64 (which should be more than enough for any reasonable scenario).

I also took the opportunity to tighten up the Bloom filter test assertions, based on the improved quality of the hashing functions.

Various other Conan requirements are also upgraded.

@tonyastolfi tonyastolfi self-assigned this Nov 6, 2024
@tonyastolfi tonyastolfi force-pushed the xxhash-bloom-and-page-tracer-fix branch from 867f2dc to de2a3ec Compare November 6, 2024 16:05
Copy link
Collaborator

@vidyasilai vidyasilai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything here looks great to me! Just a few questions and nit comments.

src/llfs/bloom_filter.hpp Outdated Show resolved Hide resolved
src/llfs/bloom_filter.hpp Outdated Show resolved Hide resolved
src/llfs/bloom_filter.test.cpp Outdated Show resolved Hide resolved
src/llfs/trace_refs_recursive.hpp Show resolved Hide resolved
@tonyastolfi tonyastolfi merged commit 92009a6 into main Nov 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants