3 ms·
The hash table implementation (the data structure) is changed, but the hash function (the one which generates the hashes) is kept the same.
by xyzzyz 7y ago
The hash table implementation (the data structure) is changed, but the hash function (the one which generates the hashes) is kept the same.
- Twirrim 7y agoMaybe I misunderstood the speed complaints about HashMap in Rust. I thought it was the hash function that was the slow bit? What is the anticipated improvements from using SwissTable?
- steveklabnik 7y agoWe do choose a hash function not designed for speed by default, but that doesn’t mean that the implementation of the table can’t be improved. This is effectively the third re-write of it.
- oconnor663 7y agoI think the bottleneck depends on the size of your table and the size of your keys. A large table with small keys will bottleneck on memory IO, but a small table with large keys will bottleneck on hashing the keys. But I definitely haven't benchmarked any of this.