benchmark with fxhash
godofdream opened this issue · 2 comments
ramhorns uses fnvhash as default, however the hasher is interchangeable.
Could you add a benchmark with https://github.com/cbreeden/fxhash ?
you have mentioned fxhash as faster alternative in https://maciej.codes/2019-03-03-ramhorns.html
ramhorns uses fnvhash as default, however the hasher is interchangeable.
You can only change the hasher used for internal hashmap that handles partials. All regular variable injection is hardcoded to fnv, and there is no way to change it with generics since the hash has to match the output of the derive macro.
FxHash produces collisions on English word dictionaries, where as 64bit fnv does not, so any performance gains there would be void if we had to compare strings by value to get rid of collisions.
I was able to reproduce hash collisions with fxhash