English

Modern Minimal Perfect Hashing: A Survey

Data Structures and Algorithms 2026-02-06 v3

Abstract

Given a set SS of nn keys, a perfect hash function for SS maps the keys in SS to the first mnm \geq n integers without collisions. It may return an arbitrary result for any key not in SS and is called minimal if m=nm = n. The most important parameters are its space consumption, construction time, and query time. Years of research now enable modern perfect hash functions to be extremely fast to query, very space-efficient, and scale to billions of keys. Different approaches give different trade-offs between these aspects. For example, the smallest constructions get within 0.1% of the space lower bound of log2(e)\log_2(e) bits per key. Others are particularly fast to query, requiring only one memory access. Perfect hashing has many applications, for example to avoid collision resolution in static hash tables, and is used in databases, bioinformatics, and stringology. Since the last comprehensive survey in 1997, significant progress has been made. This survey covers the latest developments and provides a starting point for getting familiar with the topic. Additionally, our extensive experimental evaluation can serve as a guide to select a perfect hash function for use in applications.

Keywords

Cite

@article{arxiv.2506.06536,
  title  = {Modern Minimal Perfect Hashing: A Survey},
  author = {Hans-Peter Lehmann and Thomas Mueller and Rasmus Pagh and Giulio Ermanno Pibiri and Peter Sanders and Sebastiano Vigna and Stefan Walzer},
  journal= {arXiv preprint arXiv:2506.06536},
  year   = {2026}
}

Comments

Version 3 includes brief measurements of cache faults