talira

Compare

indexmaphashbrownRust-PHF
What it isRust hash map and set that keep insertion order and index entriesSwissTable-based HashMap and HashSet for Rust, the implementation behind the standard library'sCompile-time perfect-hash lookup tables for Rust
KindOpen sourceOpen sourceOpen source
Trust0.460.620.59
Stars250230222242
Last commit2026-09-052026-11-282026-11-28
LicenceApache-2.0 OR MITApache-2.0 OR MITMIT
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———
Companyindexmap-rsThe Rust Projectrust-phf
Features
  • 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
  • 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
  • compile-time static maps and sets
  • perfect hashing with CHD, experimental ptrhash
  • macros or build-script code generation
  • no_std support
Limitations
  • Insertion order isn't kept after swap_remove or other methods that explicitly reorder entries.
  • Its default hasher, foldhash, doesn't resist HashDoS as well as SipHash; use another hasher when that matters.