,
Ragnar Groot Koerkamp
,
Marvin Williams
Creative Commons Attribution 4.0 International license
Motivation. 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 has frequent cache misses and is hard to optimize using e.g. SIMD instructions. Contributions. 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 pivots adjacent in memory, with elements between consecutive pivots stored in dedicated 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((1/W) 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(1/B) per push and O((1/B) log₂(n/M)) per pop. Results. In synthetic benchmarks, the SimdQuickHeap is 1.2× to 1.7× as fast as the monotone radix heap, the next-best competitor, and 1.4× to 2.8× as fast as the superscalar sample queue, the fastest comparison-based priority queue. The SimdQuickHeap needs around 1.5log₂ n comparisons and log₂ n nanoseconds per pair of push and pop operations. On graph benchmarks with Dijkstra’s shortest path algorithm and Jarník-Prim’s minimum spanning tree algorithm, the SimdQuickHeap is consistently the fastest.
@InProceedings{breitling_et_al:LIPIcs.ESA.2026.16,
author = {Breitling, Johannes and Groot Koerkamp, Ragnar and Williams, Marvin},
title = {{SimdQuickHeap: The QuickHeap Reconsidered}},
booktitle = {34th Annual European Symposium on Algorithms (ESA 2026)},
pages = {16:1--16:19},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-445-1},
ISSN = {1868-8969},
year = {2026},
volume = {388},
editor = {Bille, Philip and Pettie, Seth and Storandt, Sabine},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ESA.2026.16},
URN = {urn:nbn:de:0030-drops-271527},
doi = {10.4230/LIPIcs.ESA.2026.16},
annote = {Keywords: Heap, SIMD, Priority Queue}
}
archived version
archived version