The Community for Technology Leaders
40th Annual Symposium on Foundations of Computer Science (Cat. No.99CB37039) (1999)
New York, New York
Oct. 17, 1999 to Oct. 18, 1999
ISSN: 0272-5428
ISBN: 0-7695-0409-4
pp: 285
Matteo Frigo , Massachusetts Institute of Technology
Charles E. Leiserson , Massachusetts Institute of Technology
Harald Prokop , Massachusetts Institute of Technology
Sridhar Ramachandran , Massachusetts Institute of Technology
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.

H. Prokop, C. E. Leiserson, M. Frigo and S. Ramachandran, "Cache-Oblivious Algorithms," 40th Annual Symposium on Foundations of Computer Science (Cat. No.99CB37039)(FOCS), New York, New York, 1999, pp. 285.
89 ms
(Ver 3.3 (11022016))