-
Notifications
You must be signed in to change notification settings - Fork 1k
use double hashing instead of linear probing #7418
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
base: truehash
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## truehash #7418 +/- ##
===========================================
Coverage ? 99.04%
===========================================
Files ? 85
Lines ? 16126
Branches ? 0
===========================================
Hits ? 15972
Misses ? 154
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
interesting atime result data! Thanks for sharing. Error in value[[3L]](cond) :
Error in revparse_single(object, branch): Error in 'git2r_revparse_single': Requested object could not be found
when trying to checkout 3178f10af7860223b7bea0fba519104d6a9d55cais |
|
atime CI failure can probably be fixed by merging master into this branch. |
The |


So I implemented double hashing and adjusted the table size to the power of 2 (both suggestions from Ivan in #6694)
knuthis Ivans linear probing with knuth hashdoubleis the first try of double hashing where some mixing of XOR happens to spare multiplicationsnoxoris an easier variation without mixingkhashis using thekhash.hfromklibWhat really made (double and noxor) competitive with
masterandkhashwas probably parallelizing the probing inchmatchafter building the hashtable (khashalso uses this). What is left is to benchmarkchmatchdupwhich is probably slower and either needs adjustment of the hash table to also save a list of elements or at least cache the 3x lookups.