A minimal perfect hash function (minimal PHF) is a data structure mapping a static set of $n$ keys to $n$ bins without collisions. Two natural generalizations are minimal $k$-PHFs where $n$ keys are mapped to $n/k$ bins of capacity $k$ each, and (non-minimal) PHFs with load factor $α < 1$ where the number of bins is increased by a factor of $1/α$, resulting in spare capacity. While there has been a recent surge of interest in perfect hashing generally, non-minimal $k$-PHFs have not been systematically studied despite a natural use case of speeding up static hash tables: The idea is that a small cache-resident $k$-PHF maps each key $x$ to a cache-line-sized bin of capacity $k$ where $x$ resides. Ideally, this yields a branchless lookup operation with a single cache miss working at high load factors for positive and negative queries alike. Our main theoretical contribution is to determine tight space lower bounds for $k$-PHFs for all pairs of $α \in (0,1]$ and $k \geq 1$. It turns out that combining $α < 1$ and $k \geq 2$ drastically reduces the space of $k$-PHFs, e.g. for $(k,α) = (16,0.8)$ the space lower bound is $0.027$ bits per key while for $(k,α) = (16,1.0)$ and $(k,α) = (1,0.8)$ the lower bounds are higher by factors of $\approx 8$ and $\approx 32$, respectively. On the practical side, we develop a $k$-PHF based on PtrHash and tune it for use in static hash tables. Empirically, our implementation produces $k$-PHFs of size roughly $50\%$ above the lower bound. A static hash set based on this $k$-PHF is consistently at least as fast as other hash sets for negative and mixed queries. On two of the three tested architectures it achieves up to $1.5\times$ speedup for large $n\geq 30M$ where a $1$-PHF does not fit in cache.


翻译:暂无翻译

0
下载
关闭预览

相关内容

DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
24+阅读 · 5月5日
专知会员服务
11+阅读 · 2021年8月11日
【电子书】大数据挖掘,Mining of Massive Datasets,附513页PDF
专知会员服务
105+阅读 · 2020年3月22日
《动手学深度学习》(Dive into Deep Learning)PyTorch实现
专知会员服务
121+阅读 · 2019年12月31日
pytorch中六种常用的向量相似度评估方法
极市平台
22+阅读 · 2021年12月9日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Github项目推荐 | DeepHash - 深度学习哈希开源库
AI研习社
27+阅读 · 2019年4月30日
用PyTorch实现各种GANs(附论文和代码地址)
Github 项目推荐 | 用 Pytorch 实现的 Capsule Network
AI研习社
22+阅读 · 2018年3月7日
论文浅尝 | Question Answering over Freebase
开放知识图谱
19+阅读 · 2018年1月9日
分别基于SVM和ARIMA模型的股票预测 Python实现 附Github源码
数据挖掘入门与实战
15+阅读 · 2017年9月9日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
分层反无人机系统发展新趋势
专知会员服务
5+阅读 · 9月3日
何为协作武器?
专知会员服务
9+阅读 · 9月1日
《理解认知战:超越信息》
专知会员服务
13+阅读 · 9月1日
美国战争部在GenAI.mil上推出OpenAI的ChatGPT Mil
专知会员服务
8+阅读 · 8月31日
人工智能赋能军事维护:重新定义国防战备
专知会员服务
5+阅读 · 8月31日
《美陆军野战手册(2026年):特种部队》
专知会员服务
8+阅读 · 8月31日
相关VIP内容
DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
24+阅读 · 5月5日
专知会员服务
11+阅读 · 2021年8月11日
【电子书】大数据挖掘,Mining of Massive Datasets,附513页PDF
专知会员服务
105+阅读 · 2020年3月22日
《动手学深度学习》(Dive into Deep Learning)PyTorch实现
专知会员服务
121+阅读 · 2019年12月31日
相关资讯
pytorch中六种常用的向量相似度评估方法
极市平台
22+阅读 · 2021年12月9日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Github项目推荐 | DeepHash - 深度学习哈希开源库
AI研习社
27+阅读 · 2019年4月30日
用PyTorch实现各种GANs(附论文和代码地址)
Github 项目推荐 | 用 Pytorch 实现的 Capsule Network
AI研习社
22+阅读 · 2018年3月7日
论文浅尝 | Question Answering over Freebase
开放知识图谱
19+阅读 · 2018年1月9日
分别基于SVM和ARIMA模型的股票预测 Python实现 附Github源码
数据挖掘入门与实战
15+阅读 · 2017年9月9日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员