-
Notifications
You must be signed in to change notification settings - Fork 316
Description
I heard that HashMap is based on Google original design for absl::flat_hash_map
.
And noticed there was some room for improvement in Abseil implementation, so I rolled out my own (C++) versions with and without tombstones recently, including comparative benchmarks (for llvm, gcc, msvc).
I think Hashbrown/the Rust std lib could also benefit from these improvements (and additional benchmark scenarios)
by updating few things in its current design (based on the model of indivi::flat_wmap
). Mainly, it would imply using 8-bits hash fragments instead of 7 to reduce fast performance divergence on high load scenarios (in particular lookup-miss, see graphs curves).
For more details (benchmarks, documentation, impl specifics), please check this thread (in particular the discussion with u/matthieum):
https://www.reddit.com/r/rust/comments/1mloi7k/rust_hashmap_implementationperformance/