arXiv preprint ·
PHastR: Faster Minimal Perfect Hashing with Rotated Layouts
- Published
- Source
- arXiv preprint, posted before peer review
- Original
- Read it at arXiv
- Topics
Abstract
We present PHastR, a minimal perfect hash function of the PHast family. Like PHast+, the fast-to-build variant of PHast, PHastR finds feasible seeds with bit-parallel operations: its seeds move keys along rings of slots, and to evaluate the seeds of a bucket it cyclically shifts, for each key, a word recording which slots of its ring are used. Unlike PHast+, however, it is almost immune to self-collisions, which make two keys of a bucket collide for (almost) all its seeds: more than a third of the buckets bumped by PHast+ with wrapping and multiplier 3 contain one. With 8-bit seeds, PHastR uses $1.94$ bits per key, essentially the same space as the best variant of PHast+ with wrapping, but it is built in $37\%$ of the time, and its queries are $28\%$ faster on $10^9$ keys, as it bumps $0.5\%$ of the keys instead of $3.9\%$; they are faster also than those of PHast, which takes twelve times as long to build, and about as fast as those of PtrHash, which uses more than one bit per key more. With a larger expected bucket size PHastR comes within $0.02$ bits per key of the space of PHast, using $1.90$ bits per key, and still has faster queries. Its construction also scales better with the number of threads: with all the threads of a 48-core machine it is almost three times faster than that of PHast+. Finally, we argue that when each key can be placed only within a range of $W$ slots, every placement of $n$ random keys on $n$ slots, however found, must bump on large key sets a constant fraction of the keys: we derive a lower bound of about $0.1/W$ on this fraction, and we estimate that the best placement bumps about $1/2W$ of the keys, which is about one tenth of the keys bumped by PHastR.
The authors’ abstract, as arXiv lists it. arXiv’s listings, abstracts included, are free for anyone to reuse.
Read it on ReadSearch
Each opens after you create an account, and brings you back to this paper.
More in Data Structures & Algorithms
Improved Combinatorial Auctions with and without Samples
Learning-Augmented Streaming Algorithms for Approximating Boolean Max-CSPs
Certifying Capacity and Gaps of the Rank-Dependent Gain-Sharing Framework for Ranking
Approximation Algorithms for Emergency Vertex Cover with Few Stations and Fault-Tolerant Coverage
Query Complexity of Densest Sub(hyper)graph Problems
Get the few papers worth your time in Data Structures & Algorithms every morning.
ReadSearch reads the new papers in your field each day and brings you the few worth reading, each with its key finding in a sentence.