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

使用PTHash并行且外部内存地构建最小完美哈希函数

Parallel and External-Memory Construction of Minimal Perfect Hash Functions with PTHash

Giulio Ermanno Pibiri, Roberto Trani

AI总结:

提出支持多线程和外部内存处理的PTHash新构建算法,在保持竞争性构建时间与空间消耗的同时,实现了2-6倍更优的查找性能。

摘要:

函数$f : U \to \{0,\ldots,n-1\}$是大小为$n$的集合$S \subseteq U$的最小完美哈希函数,如果$f$将$S$双射地映射到前$n$个自然数。这些函数对于计算中的许多实际应用非常重要,例如搜索引擎、计算机网络和数据库。已经提出了几种算法来构建最小完美哈希函数,这些算法:能够很好地扩展到大型集合,保持快速的求值时间,并且占用非常少的空间,例如2-3位/键。PTHash就是这样一种算法,它实现了在压缩空间内非常快速的求值,通常比其他技术快几倍。在这项工作中,我们提出了一种新的PTHash构建算法,支持:(1)多线程,以更快或更节省空间地构建函数,以及(2)外部内存处理,以扩展到远大于可用内部内存的输入。尽管具有很大的实际影响,但文献中很少有其他算法具备这些特性。我们在大型真实字符串集合上进行了广泛的实验评估,并表明,相对于其他技术,PTHash在构建时间和空间消耗方面具有竞争力,但保留了2-6倍更好的查找时间。

英文摘要:

A function $f : U \to \{0,\ldots,n-1\}$ is a minimal perfect hash function for a set $S \subseteq U$ of size $n$, if $f$ bijectively maps $S$ into the first $n$ natural numbers. These functions are important for many practical applications in computing, such as search engines, computer networks, and databases. Several algorithms have been proposed to build minimal perfect hash functions that: scale well to large sets, retain fast evaluation time, and take very little space, e.g., 2 - 3 bits/key. PTHash is one such algorithm, achieving very fast evaluation in compressed space, typically several times faster than other techniques. In this work, we propose a new construction algorithm for PTHash enabling: (1) multi-threading, to either build functions more quickly or more space-efficiently, and (2) external-memory processing to scale to inputs much larger than the available internal memory. Only few other algorithms in the literature share these features, despite of their big practical impact. We conduct an extensive experimental assessment on large real-world string collections and show that, with respect to other techniques, PTHash is competitive in construction time and space consumption, but retains 2 - 6$\times$ better lookup time.

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

↑