Closed torkleyy closed 2 years ago
cc @xMAC94x
This gets us back to the speed before I removed hashbrown
in the last PR, but without the unnecessary dependency on hashbrown
.
Any reason to choose ahash
over fxhash
? https://nnethercote.github.io/perf-book/hashing.html
I am not familar with the wide range, but let the veloren community know. there are quite some good experts in there that prob know the best hash for a crate like shred :)
I figured the 1-4% improvement wouldn't be worth an implementation that's not as widely applicable and apparently it has some other pitfalls.
mhhh okay, do we have any benchmarks or how did we compare the performance regarding to hasbrown ?
The benchmarks are linked in your comment:
An attempt to switch from fxhash to ahash resulted in slowdowns of 1-4%.
I think benchmarks in shred
for this would be great as well, but for now, I just want to revert the accidental performance regression. Once we have such benchmarks we can also consider other hashers if they show beneficial.
Partially reverts 496564035390f085f677ed4e37852b1a5b4854cd (we use ahash again, but without using
hashbrown
which is just a copy ofstd::collections::HashMap
withahash
as the default).