arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2212.09562cs.DS
收藏

基于 RecSplit 的最小完美哈希函数的高性能构建

High Performance Construction of RecSplit Based Minimal Perfect Hash Functions

Dominik Bez, Florian Kurpicz, Hans-Peter Lehmann, Peter Sanders

AI总结:

本文提出旋转拟合技术并利用比特、向量、核心和 GPU 多层并行,大幅提升 RecSplit 最小完美哈希函数的构建速度,在 GPU 上实现最高 5438 倍加速且更节能。

摘要:

最小完美哈希函数(MPHF)将对象集合 S 双射映射到前 |S| 个整数。它可作为数据库和数据压缩中的基础构件。RecSplit [Esposito et al., ALENEX'20] 是目前空间效率最高的实用最小完美哈希函数,它在很大程度上依赖以蛮力方式尝试哈希函数。我们引入了旋转拟合(rotation fitting)这一新技术,通过大幅减少需要尝试的哈希函数数量,使搜索更加高效。此外,我们通过在比特、向量、核心和 GPU 层面利用并行性,大幅改善了 RecSplit 的构建时间。综合这些改进,在 8 核 CPU 上可获得最高 239 倍的加速,使用 GPU 时加速最高可达 5438 倍。原始的单线程 RecSplit 实现需要 1.5 小时才能为 500 万个对象构建一个每个对象 1.56 比特的 MPHF。在 GPU 上,我们仅用 5 秒就实现了相同的空间占用。鉴于加速倍数大于能耗的增加幅度,我们的实现比原始实现更节能。

英文摘要:

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. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑