2013 IEEE 54th Annual Symposium on Foundations of Computer Science (1999)

New York, New York

Oct. 17, 1999 to Oct. 18, 1999

ISSN: 0272-5428

ISBN: 0-7695-0409-4

pp: 285

Harald Prokop , Massachusetts Institute of Technology

Charles E. Leiserson , Massachusetts Institute of Technology

Matteo Frigo , Massachusetts Institute of Technology

Sridhar Ramachandran , Massachusetts Institute of Technology

ABSTRACT

This paper presents asymptotically optimal algorithms for rectangular matrix transpose, FFT, and sorting on computers with multiple levels of caching. Unlike previous optimal algorithms, these algorithms are cache oblivious: no variables dependent on hardware parameters, such as cache size and cache-line length, need to be tuned to achieve optimality. Nevertheless, these algorithms use an optimal amount of work and move data optimally among multiple levels of cache. For a cache with size Z and cache-line length L where \math the number of cache misses for an \math matrix transpose is \math. The number of cache misses for either an n-point FFT or the sorting of n numbers is \math. We also give an \math-work algorithm to multiply an \math matrix by an \math matrix that incurs \math cache faults.We introduce an `ideal-cache' model to analyze our algorithms. We prove that an optimal cache-oblivious algorithm designed for two levels of memory is also optimal for multiple levels and that the assumption of optimal replacement in the ideal-cache model can be simulated efficiently by LRU replacement. We also provide preliminary empirical results on the effectiveness of cache-oblivious algorithms in practice.

INDEX TERMS

CITATION

Harald Prokop,
Charles E. Leiserson,
Matteo Frigo,
Sridhar Ramachandran,
"Cache-Oblivious Algorithms",

*2013 IEEE 54th Annual Symposium on Foundations of Computer Science*, vol. 00, no. , pp. 285, 1999, doi:10.1109/SFFCS.1999.814600SEARCH