Skip to content
uencoder

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
    hello
    Output
    0x248bfa47

    MurmurHash3 x86_32

Common errors

Using MurmurHash for persistent keys (unstable across versions)
Use a version-pinned hash or a cryptographic hash

Related terms

Related tools

References