4 ms·
My goto these days (and afaik the state of the art) is boost::unordered_flat_set paired with rapidhash for hashing (since the GNU std::hash functions based on m
by nly 3mo ago
My goto these days (and afaik the state of the art) is boost::unordered_flat_set paired with rapidhash for hashing (since the GNU std::hash functions based on murmurhash are ridiculously slow)
The cacheline performance is pretty hard to beat (SIMD optimised linear scan before hopping), which is where all the wins come in the real world.
But basically any of the faster hash maps from absl, boost or folly are going to wreck the standard library in terms of perf
- spacechild1 3mo ago> with rapidhash for hashing (since the GNU std::hash functions based on murmurhash are ridiculously slow) Doesn't boost::unordered_flat_map use boost::hash by default? How does it compare to rapid hash and std::hash?
- nly 3mo agoIt's not great. Rapidhash is just insanely fast and provides good distribution, with built-in support for mixing.
- spacechild1 3mo agoThat's good to know, thanks!
- lefty2 3mo agoI tried both unordered_flat_map and hopscotch map with the pathfinding algorithm that my game uses. Both were slower than regular unordered_map. unordered_flat_map about 33% slower and hopscotch was 390% slower