Open jedisct1 opened 11 months ago
Hashbrown specifically doesn't make any guarantees about hash function security. The only reason we don't use FxHash by default is because it gives poor results if the input values are all multiples of the same value (e.g. all multiples of 4).
Curious, what is the best hasher if one only cares about perf?
It's an unanswerable question. You can make an arbitrarily fast hasher by reducing the quality of the output. For example, only hash the first 16 bytes of input strings, or even just return a constant value. Both of those are legal Hasher implementations.
See https://github.com/tkaitchuck/aHash/issues/163
It's also currently completely broken on ARM: https://github.com/tkaitchuck/aHash/issues/166