3 ms·
Hashbrown is not about the hashing algorithm. It uses fx hash which is pretty commonly used in Rust. I imagine they will still keep SipHash
by rapsey 8y ago
Hashbrown is not about the hashing algorithm. It uses fx hash which is pretty commonly used in Rust. I imagine they will still keep SipHash
- littlestymaar 8y agoOK thanks. But that would mean the performance gain would not be as dramatic I guess ?
- Manishearth 8y agoIt's still pretty major, because SIMD, but not as dramatic https://github.com/Amanieu/hashbrown#performance https://github.com/Amanieu/hashbrown#performance Note that the hashbrown crate uses FxHash by default, so the second table is the fair comparison. When ported to the stdlib it will likely be changed to have SipHash as the default. For the standard hashmap, replacing SipHash with FxHash gets you a 4x perf boost. Replacing the standard hashmap with hashbrown gets you a 2x perf boost (when you're using FxHash, there are no numbers here for when you're using SipHash but I suspect it will still be significant, if smaller)
- littlestymaar 8y agoThanks a lot for the clarification!