MurmurHash
MurmurHash is a non-cryptographic hash designed by Austin Appleby, achieving good distribution and high speed through multiply-and-rotate operations.
Purpose
Provides a low-collision, high-speed non-cryptographic hash for hash tables.
Mechanism
Each 4-byte block is mixed by multiplying by a constant, rotating, and multiplying again. Trailing bytes are handled at the end. A finalizer (fmix32) provides further diffusion. MurmurHash3 supports 32/128-bit output. Non-cryptographic, with known collisions.
Use cases
- Hash tables and Bloom filters
- Default Rust HashMap hasher
- Database internal hashing
- Load-balancing sharding
Examples
- Input
helloOutput0x248bfa47MurmurHash3 x86_32
Common errors
- Using MurmurHash for persistent keys (unstable across versions)
- Use a version-pinned hash or a cryptographic hash
Related terms
FNV
FNV (Fowler-Noll-Vo) is a simple non-cryptographic hash that computes quickly via XOR and multiplication by a prime, used for hash tables and fingerprinting. GLOSSARY
xxHash
xxHash is an extremely fast non-cryptographic hash designed by Yann Collet, approaching memory bandwidth limits on modern CPUs, used with LZ4/Zstd compression. GLOSSARY
CRC32
CRC32 is a 32-bit cyclic redundancy check based on polynomial division over GF(2), used to detect transmission errors — not a cryptographic hash. GLOSSARY