## Quickheaps: Simple, Efficient, and Cache-Oblivious (2008)

### BibTeX

@MISC{Navarro08quickheaps:simple,,

author = {Gonzalo Navarro and Rodrigo Paredes},

title = {Quickheaps: Simple, Efficient, and Cache-Oblivious },

year = {2008}

}

### OpenURL

### Abstract

We present the Quickheap, a simple and efficient data structure for implementing priority queues in main and secondary memory. Quickheaps are comparable with classical binary heaps in simplicity, but are more cache-friendly. This makes them an excellent alternative for a secondary memory implementation. We show that the average amortized CPU cost per operation over a Quickheap of m elements is O(log m), and this translates into O((1/B) log(m/M)) I/O cost with block size B, in a cache-oblivious fashion. Our experimental results show that Quickheaps are very competitive with the best alternative external memory heaps.

### Citations

9158 | Introduction to Algorithms
- Cormen, Leiserson, et al.
- 1998
(Show Context)
Citation Context ...her operations such as delete, decreaseKey and increaseKey can be added if we have a dictionary to know the position of the element to modify. The associated algorithms can be found in most textbooks =-=[7]-=-. There are dozens of other priority queue implementations described in the literature. Many classical data structures have been adapted to work efficiently on secondary memory [15], and priority queu... |

335 | External memory algorithms and data structures: Dealing with MASSIVE data
- Vitter
(Show Context)
Citation Context ...d in most textbooks [7]. There are dozens of other priority queue implementations described in the literature. Many classical data structures have been adapted to work efficiently on secondary memory =-=[15]-=-, and priority queues are not an exception. Some examples are buffer trees [2, 11], M/B-ary heaps [12, 8], and Array Heaps [6], which achieve the lower bound of O((1/B)log M/B(m/B)) amortized I/Os per... |

162 |
McCreight: “Organization and Maintenance of Large Ordered
- Bayer, M
- 1972
(Show Context)
Citation Context ...r complex to implement and heavyweight in practice (in extra space and time) [4]. Other techniques are simple but do not perform so well (in theory or in practice), for example those that use B-trees =-=[3]-=-. A practical comparison of existing secondary memory priority queues was carried out by Brengel et al. [4], where in addition they adapt two-level radix heaps [1] to secondary memory (R-Heaps), and a... |

158 | The bu®er tree: A new technique for optimal I/O-algorithms
- Arge
- 1995
(Show Context)
Citation Context ...ns described in the literature. Many classical data structures have been adapted to work efficiently on secondary memory [15], and priority queues are not an exception. Some examples are buffer trees =-=[2, 11]-=-, M/B-ary heaps [12, 8], and Array Heaps [6], which achieve the lower bound of O((1/B)log M/B(m/B)) amortized I/Os per operation [15]. Those structures, however, are rather complex to implement and he... |

155 |
Algorithm 232: Heapsort
- Williams
- 1964
(Show Context)
Citation Context ...our complexity results. ⋆ This work has been funded by a grant of Yahoo! Research Latin America.2 Related Work 2.1 Priority Queues The classical implementation of a priority queue uses a binary heap =-=[16]-=-. It allows operations insert, findMin, extractMin, and heapify. Other operations such as delete, decreaseKey and increaseKey can be added if we have a dictionary to know the position of the element t... |

110 | Faster algorithms for the shortest path problem
- Ahuja, Mehlhorn, et al.
- 1990
(Show Context)
Citation Context ..., for example those that use B-trees [3]. A practical comparison of existing secondary memory priority queues was carried out by Brengel et al. [4], where in addition they adapt two-level radix heaps =-=[1]-=- to secondary memory (R-Heaps), and also simplify Array-Heaps [6]. The latter stays optimal in the amortized sense and becomes simple to implement. The experiments in [4] show that R-Heaps and Array-H... |

76 | Improved algorithms and data structures for solving graph problems in external memory
- Kumar, Schwabe
- 1996
(Show Context)
Citation Context ...erature. Many classical data structures have been adapted to work efficiently on secondary memory [15], and priority queues are not an exception. Some examples are buffer trees [2, 11], M/B-ary heaps =-=[12, 8]-=-, and Array Heaps [6], which achieve the lower bound of O((1/B)log M/B(m/B)) amortized I/Os per operation [15]. Those structures, however, are rather complex to implement and heavyweight in practice (... |

51 | Fast Priority Queues for Cached Memory
- Sanders
- 1999
(Show Context)
Citation Context ... sense and becomes simple to implement. The experiments in [4] show that R-Heaps and Array-Heaps are by far the best choices for secondary memory. In the same issue, Sanders introduced sequence heaps =-=[14]-=-, which can be seen as a simplification of the improved Array-Heaps of [4]. Sanders reports that sequence heaps are faster than the improved Array-Heaps, yet the experiments only consider caching in m... |

41 | On the limits of cache-obliviousness - Brodal, Fagerberg - 2003 |

38 |
Algorithm 65, FIND
- Hoare
- 1961
(Show Context)
Citation Context ...ort algorithm, which can solve this problem in O(m + k log k) optimal expected time, and performs better in practice than previous approaches. To output the k smallest elements, IQS calls Quickselect =-=[10]-=- to find the smallest element of arrays A[0,m − 1], A[1,m − 1], ..., A[k − 1,m − 1]. This leaves the k smallest elements sorted in A[0,k − 1]. IQS avoids the O(kn) complexity by reusing the work acros... |

20 |
Heaps and heapsort on secondary storage
- Fadel, Jakobsen, et al.
- 1999
(Show Context)
Citation Context ...erature. Many classical data structures have been adapted to work efficiently on secondary memory [15], and priority queues are not an exception. Some examples are buffer trees [2, 11], M/B-ary heaps =-=[12, 8]-=-, and Array Heaps [6], which achieve the lower bound of O((1/B)log M/B(m/B)) amortized I/Os per operation [15]. Those structures, however, are rather complex to implement and heavyweight in practice (... |

16 | An experimental study of priority queues in external memory
- Brengel, Crauser, et al.
(Show Context)
Citation Context ...ich achieve the lower bound of O((1/B)log M/B(m/B)) amortized I/Os per operation [15]. Those structures, however, are rather complex to implement and heavyweight in practice (in extra space and time) =-=[4]-=-. Other techniques are simple but do not perform so well (in theory or in practice), for example those that use B-trees [3]. A practical comparison of existing secondary memory priority queues was car... |

8 | Early experiences in implementing the buffer tree. Citeseer
- Hutchinson, Maheshwari
- 1997
(Show Context)
Citation Context ...ns described in the literature. Many classical data structures have been adapted to work efficiently on secondary memory [15], and priority queues are not an exception. Some examples are buffer trees =-=[2, 11]-=-, M/B-ary heaps [12, 8], and Array Heaps [6], which achieve the lower bound of O((1/B)log M/B(m/B)) amortized I/Os per operation [15]. Those structures, however, are rather complex to implement and he... |

7 | Optimal incremental sorting
- Paredes, Navarro
- 2006
(Show Context)
Citation Context ...y, respectively), answer whether an arbitrary element belongs to the queue (find), delete an arbitrary element from the queue (delete), and so on. Inspired by the IncrementalQuicksort algorithm (IQS) =-=[13]-=-, we develop a novel data structure for implementing priority queues, coined Quickheaps. Quickheaps enable efficient element insertion, minimum extraction, deletion of arbitrary elements and modificat... |

2 |
Worst-case external-memory priority queues
- Brodal, Katajainen
- 1998
(Show Context)
Citation Context ...ata structures have been adapted to work efficiently on secondary memory [15], and priority queues are not an exception. Some examples are buffer trees [2, 11], M/B-ary heaps [12, 8], and Array Heaps =-=[6]-=-, which achieve the lower bound of O((1/B)log M/B(m/B)) amortized I/Os per operation [15]. Those structures, however, are rather complex to implement and heavyweight in practice (in extra space and ti... |