High Performance Construction of RecSplit Based Minimal Perfect Hash Functions

Dominik Bez, Florian Kurpicz, Hans-Peter Lehmann, Peter Sanders
12/19/2022
cs.DS

Official code: ByteHamster/GpuRecSplit (16 stars, C++, GPL-3.0, last commit 2026-01-04).

Abstract

A minimal perfect hash function (MPHF) bijectively maps a set S of objects to the first |S| integers. It can be used as a building block in databases and data compression.

Show full abstract

RecSplit [Esposito et al., ALENEX'20] is currently the most space efficient practical minimal perfect hash function. It heavily relies on trying out hash functions in a brute force way. We introduce rotation fitting, a new technique that makes the search more efficient by drastically reducing the number of tried hash functions. Additionally, we greatly improve the construction time of RecSplit by harnessing parallelism on the level of bits, vectors, cores, and GPUs. In combination, the resulting improvements yield speedups up to 239 on an 8-core CPU and up to 5438 using a GPU. The original single-threaded RecSplit implementation needs 1.5 hours to construct an MPHF for 5 Million objects with 1.56 bits per object. On the GPU, we achieve the same space usage in just 5 seconds. Given that the speedups are larger than the increase in energy consumption, our implementation is more energy efficient than the original implementation.

View on arXivView PDF

Code Implementations(1)

GPL-3.0

Parallel space-efficient minimal perfect hash function on SIMD and GPU

160C++, CudaOct 15, 202211 months agoGPL-3.0

Similar Papers

Cite this paper

@article{bez2022high,
  title  = {High Performance Construction of RecSplit Based Minimal Perfect Hash Functions},
  author = {Dominik Bez and Florian Kurpicz and Hans-Peter Lehmann and Peter Sanders},
  year   = {2022},
  eprint = {2212.09562},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.09562}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2212.09562.svg)](https://codeofpaper.com/paper/2212.09562)

Discussion