
10 Dec
2024
10 Dec
'24
2:57 p.m.
Andrey Semashev wrote:
It might be possible to reuse one of the hash algorithms implemented in the library for this bit mixing.
Interesting "meta" approach, but not necessarily better in practice than the current one, under any practical criteria.
Why? Yes, applying, e.g. fnv1a_32, would be slower than a single multiply or slicing an array, but from the perspective of quality of the reduced digest this approach sounds good to me.
Because taking the low 32 bits from a high quality digest is better than taking the FNV-1a hash of all the bits.