talira

Compare

hashbrownrustc-hashRust-PHFindexmap
What it isSwissTable-based HashMap and HashSet for Rust, the implementation behind the standard library'sThe fast, non-cryptographic FxHasher that rustc uses, with FxHashMap and FxHashSetCompile-time perfect-hash lookup tables for RustRust hash map and set that keep insertion order and index entries
KindOpen sourceOpen sourceOpen sourceOpen source
Trust0.620.470.590.46
Stars302260622422502
Last commit2026-11-282026-11-262026-11-282026-09-05
LicenceApache-2.0 OR MITApache-2.0 OR MITMITApache-2.0 OR MIT
PricingFree and open sourceFree and open sourceFree and open sourceFree and open source
Free tierYesYesYesYes
Self-hostable————
Ways to run it————
SOC 2————
HIPAA————
SSO————
API————
Plugins————
MCP server————
CompanyThe Rust ProjectThe Rust Projectrust-phfindexmap-rs
Features
  • 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
  • FxHashMap and FxHashSet type aliases
  • fast non-cryptographic hasher
  • no_std support with the std feature off
  • compile-time static maps and sets
  • perfect hashing with CHD, experimental ptrhash
  • macros or build-script code generation
  • no_std 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.
  • Not resistant to hash-flooding denial-of-service attacks, unlike the standard library's SipHash default
    • Insertion order isn't kept after swap_remove or other methods that explicitly reorder entries.