announcing ph - open-source, rust library for perfect hashing
https://crates.io/crates/ph https://github.com/beling/bsuccinct-rs
A minimal perfect hash function (MPHF) is a bijection from a key set K to the set {0, 1, …, |K|−1}.
ph library contains an implementation of two MPHFs: FMPH and FMPHGO. Both can be constructed for any set K of hashable items and represented using about 2.8 and 2.1 bits per key (regardless of key types), respectively. Both are fast (O(1)) to evaluate. Their construction requires very little auxiliary memory, takes a short (O(|K|)) time (which is especially true for FMPH) and, in addition, can be parallelized. A recently published paper provides the details.
ph is to my knowledge the most advanced and efficient rust library for constructing MPHFs.
Posted May 19, 2023, 5:58 PM UTC · edited