Priority queues are data structures that maintain a dynamic collection of elements and allow inserting new elements and removing the smallest element. The most widely known and used priority queue is likely the implicit binary heap, even though it is has frequent cache misses and is hard to optimize using e.g. SIMD instructions. We introduce the SimdQuickHeap, a variant of the QuickHeap that was introduced by Navarro and Paredes in 2010. As suggested by the name, the data structure bears some similarity to QuickSort. We modify the data layout of the original QuickHeap to have all \emph{pivots} adjacent in memory, with elements between consecutive pivots stored in dedicated \emph{buckets}. This allows efficient SIMD implementations for both partitioning of buckets and scanning the list of pivots to find the bucket to append newly inserted elements to. The SimdQuickHeap has amortized expected complexity $O(\log n)$ per operation, which improves to $O(\frac 1W\log n)$ in non-degenerate cases, where $W$ is the number of words in a SIMD register. In this case, the I/O-complexity is amortized $O(\frac 1B)$ per push and $O(\frac 1B \log_2 \frac nM)$ per pop. In synthetic benchmarks, the SimdQuickHeap is up to twice as fast as the next-best competitor, including the non-comparison radix heap, and needs around $1.5\log_2 n$ comparisons and $\log_2 n$ nanoseconds per pair of push and pop operations. On graph benchmarks with Dijkstra's shortest path algorithm and Jarnik-Prim's minimum spanning tree algorithm, the SimdQuickHeap is consistently the fastest.


翻译:暂无翻译

0
下载
关闭预览

相关内容

DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
9+阅读 · 5月5日
《基于大语言模型的视觉侦察》最新19页slides
专知会员服务
31+阅读 · 2025年11月19日
Nat. Rev. Phys.速递:复杂网络的鲁棒性和韧性
专知会员服务
28+阅读 · 2024年1月21日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
深度学习「CV」学习实践指南!
专知
10+阅读 · 2020年6月21日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
手把手教 | 深度学习库PyTorch(附代码)
数据派THU
27+阅读 · 2018年3月15日
三味Capsule:矩阵Capsule与EM路由
PaperWeekly
10+阅读 · 2018年3月2日
论文浅尝 | Question Answering over Freebase
开放知识图谱
19+阅读 · 2018年1月9日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月31日
Arxiv
0+阅读 · 3月18日
VIP会员
相关主题
最新内容
DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
9+阅读 · 5月5日
《美空军条令出版物 2-0:情报(2026版)》
专知会员服务
14+阅读 · 5月5日
帕兰提尔 Gotham:一个游戏规则改变器
专知会员服务
9+阅读 · 5月5日
【综述】 机器人学习中的世界模型:全面综述
专知会员服务
13+阅读 · 5月4日
伊朗的导弹-无人机行动及其对美国威慑的影响
相关VIP内容
DeepSeek 版Claude Code,免费小白安装教程来了!
专知会员服务
9+阅读 · 5月5日
《基于大语言模型的视觉侦察》最新19页slides
专知会员服务
31+阅读 · 2025年11月19日
Nat. Rev. Phys.速递:复杂网络的鲁棒性和韧性
专知会员服务
28+阅读 · 2024年1月21日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
34+阅读 · 2019年10月18日
相关资讯
深度学习「CV」学习实践指南!
专知
10+阅读 · 2020年6月21日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
手把手教 | 深度学习库PyTorch(附代码)
数据派THU
27+阅读 · 2018年3月15日
三味Capsule:矩阵Capsule与EM路由
PaperWeekly
10+阅读 · 2018年3月2日
论文浅尝 | Question Answering over Freebase
开放知识图谱
19+阅读 · 2018年1月9日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员