Low‐bias 32 bit mix function.

Synopsis

Declared in <folly/hash/Hash.h>

constexpr
uint32_t
lowbias_mix32(uint32_t key) noexcept;

Description

A bijection over the 32‐bit integers with strong avalanche: two multiplies and three xorshifts, with constants found by the hash‐prospector search to minimize avalanche bias (~0.107, vs ~0.174 for the widely‐cited "lowbias32" constants and far higher for jenkins_rev_mix32, whose sparse (1 + 2ˆk) multipliers diffuse poorly). Both faster and substantially higher quality than jenkins_rev_mix32; usable as a drop‐in finalizer for 32‐bit keys. See lowbias_unmix32 for the inverse.

https://github.com/skeeto/hash‐prospector/issues/19

methodset lowbias

Return Value

The mixed 32‐bit value

Parameters

Name

Description

key

The 32‐bit value to mix

Created with MrDocs