# Fast and scalable minimal perfect hashing for massive key sets

**Authors:** Antoine Limasset, Guillaume Rizk, Rayan Chikhi, Pierre, Peterlongo

arXiv: 1702.03154 · 2018-11-06

## TL;DR

This paper presents BBhash, a parallel minimal perfect hash function implementation that is highly efficient in construction time and memory usage, capable of handling extremely large key sets up to 10^12 elements.

## Contribution

It revisits a simple algorithm and demonstrates its competitiveness, providing the first implementation tested on 10^12 elements with practical performance.

## Key findings

- Constructs a minimal perfect hash for 10^10 elements in under 7 minutes
- Uses only 3.7 bits per element in the resulting hash
- Successfully tested on input sizes up to 10^12 elements

## Abstract

Minimal perfect hash functions provide space-efficient and collision-free hashing on static sets. Existing algorithms and implementations that build such functions have practical limitations on the number of input elements they can process, due to high construction time, RAM or external memory usage. We revisit a simple algorithm and show that it is highly competitive with the state of the art, especially in terms of construction time and memory usage. We provide a parallel C++ implementation called BBhash. It is capable of creating a minimal perfect hash function of $10^{10}$ elements in less than 7 minutes using 8 threads and 5 GB of memory, and the resulting function uses 3.7 bits/element. To the best of our knowledge, this is also the first implementation that has been successfully tested on an input of cardinality $10^{12}$. Source code: https://github.com/rizkg/BBHash

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1702.03154/full.md

## Figures

5 figures with captions in the complete paper: https://tomesphere.com/paper/1702.03154/full.md

## References

16 references — full list in the complete paper: https://tomesphere.com/paper/1702.03154/full.md

---
Source: https://tomesphere.com/paper/1702.03154