Open Zizico2 opened 3 years ago
The default hasher of std and the hashbrown crate are still different:
The default hashing algorithm is currently SipHash 1-3
The default hashing algorithm is currently AHash
So hashbrown::HashMap
is still faster than std::collections::HashMap
. However type HashMap<K, V> = std::collections::HashMap<K, V, ahash::RandomState>
should have the same performance as hashbrown::HashMap
IIUC.
love this idea
Two versions of hashbrown seems overkill.
Unfortunately, the raw table API is not stabilized in std
, which is the only real reason that this crate depends directly on hashbrown
. Ideally, hashbrown
would be completely unnecessary.
Once the raw table API is stabilized, this crate can easily shift over to use the HashMap types directly from std
.
The SwissTable implementation in hashbrown as been merged to std. https://github.com/rust-lang/rust/pull/58623 Should the dependency be kept or should this use the std version?