Engineering a cache-oblivious sorting algorithm
Open Access
- 12 June 2008
- journal article
- research article
- Published by Association for Computing Machinery (ACM) in ACM Journal of Experimental Algorithmics
- Vol. 12, 1-23
Abstract
This paper is an algorithmic engineering study of cache-oblivious sorting. We investigate by empirical methods a number of implementation issues and parameter choices for the cache-oblivious sorting algorithm Lazy Funnelsort and compare the final algorithm with Quicksort, the established standard for comparison-based sorting, as well as with recent cache-aware proposals. The main result is a carefully implemented cache-oblivious sorting algorithm, which, our experiments show, can be faster than the best Quicksort implementation we are able to find for input sizes well within the limits of RAM. It is also at least as fast as the recent cache-aware implementations included in the test. On disk, the difference is even more pronounced regarding Quicksort and the cache-aware algorithms, whereas the algorithm is slower than a careful implementation of multiway Mergesort, such as TPIE.Keywords
Funding Information
- Carlsbergfondet (ANS-0257/20)
- Seventh Framework Programme (IST-1999-14186 (ALCOM-FT))
This publication has 26 references indexed in Scilit:
- Cache-Oblivious Data Structures2004
- Efficient sorting using registers and cachesACM Journal of Experimental Algorithmics, 2002
- External memory algorithms and data structuresACM Computing Surveys, 2001
- Fast priority queues for cached memoryACM Journal of Experimental Algorithmics, 2000
- Improving memory performance of sorting algorithmsACM Journal of Experimental Algorithmics, 2000
- The Influence of Caches on the Performance of SortingJournal of Algorithms, 1999
- Engineering a sort functionSoftware: Practice and Experience, 1993
- The input/output complexity of sorting and related problemsCommunications of the ACM, 1988
- A Simple Algorithm for Merging Two Disjoint Linearly Ordered SetsSIAM Journal on Computing, 1972
- Algorithm 230: Matrix PermutationCommunications of the ACM, 1964