folly::hash::moremur_mix64

Pelle Evensen's moremur 64 bit mix function.

Synopsis

Declared in <folly/hash/Hash.h>

constexpr
uint64_t
moremur_mix64(uint64_t key) noexcept;

Description

A bijection over the 64-bit integers with strong avalanche: it passes the full RRC/PractRand mixer test battery, at lower cost, two multiplies and three xorshifts on a shorter dependency chain. Usable as a drop-in finalizer for 64-bit keys; see moremur_unmix64 for the inverse.

https://mostlymangling.blogspot.com/2019/12/stronger-better-morer-moremur-better.html

methodset moremur

Return Value

The mixed 64-bit value

Parameters

NameDescription
keyThe 64-bit value to mix