talira

Compare

Rust-PHFhashbrownindexmap
What it isCompile-time perfect-hash lookup tables for RustSwissTable-based HashMap and HashSet for Rust, the implementation behind the standard library'sRust hash map and set that keep insertion order and index entries
KindOpen sourceOpen sourceOpen source
Trust0.590.620.46
Stars224230222502
Last commit2026-11-282026-11-282026-09-05
LicenceMITApache-2.0 OR MITApache-2.0 OR MIT
PricingFree and open sourceFree and open sourceFree and open source
Free tierYesYesYes
Self-hostable———
Ways to run it———
SOC 2———
HIPAA———
SSO———
API———
Plugins———
MCP server———
Companyrust-phfThe Rust Projectindexmap-rs
Features
  • compile-time static maps and sets
  • perfect hashing with CHD, experimental ptrhash
  • macros or build-script code generation
  • no_std support
  • Drop-in replacement for the standard HashMap and HashSet
  • foldhash as the default hasher
  • 1 byte of overhead per entry and no allocation for empty maps
  • SIMD lookups across several entries at once
  • no_std support (with a global allocator), plus optional serde and rayon support
  • IndexMap and IndexSet keep insertion order
  • Look entries up by key or by numerical index
  • Fast iteration over densely stored entries
  • shift_remove keeps relative order; swap_remove is faster
  • Works in no_std environments
Limitations
    • Its default hasher, foldhash, doesn't resist HashDoS as well as SipHash; use another hasher when that matters.
    • Insertion order isn't kept after swap_remove or other methods that explicitly reorder entries.