Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2024-12-10 14:57:29


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk