ALCOMFT-TR-03-101

ALCOM-FT
 

Gerth Stølting Brodal, Rolf Fagerberg and Kristoffer Vinther
Engineering a Cache-Oblivious Sorting Algorithm
Århus. Work packages 1 and 5. November 2003.
Abstract: The cache-oblivious model of computation is a two-level memory model with the assumption that the parameters of the model are unknown to the algorithms. A consequence of this assumption is that an algorithm efficient in the cache oblivious model is automatically efficient in a multi-level memory model.

Since the introduction of the cache-oblivious model by Frigo et al. in 1999, a number of algorithms and data structures in the model has been proposed and analyzed. However, less attention has been given to whether the nice theoretical proporities of cache-oblivious algorithms carry over into practice.

This paper is an algorithmic engineering study of cache-oblivious sorting. We investigate a number of implementation issues and parameters choices for the cache-oblivious sorting algorithm Lazy Funnelsort by empirical methods, 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 we compare to the best implementation of Quicksort we can find, and find that it competes very well for input residing in RAM, and outperforms Quicksort for input on disk.

Postscript file: ALCOMFT-TR-03-101.ps.gz (190 kb).

System maintainer Gerth Stølting Brodal <gerth@cs.au.dk>