Towards a theory of cache-efficient algorithms

  • Authors:
  • Sandeep Sen;Siddhartha Chatterjee;Neeraj Dumir

  • Affiliations:
  • Indian Institute of Technology Delhi, New Delhi, India;IBM Research, Yorktown Heights, New York;Indian Institute of Technology Delhi, New Delhi, India

  • Venue:
  • Journal of the ACM (JACM)
  • Year:
  • 2002

Quantified Score

Hi-index 0.01

Visualization

Abstract

We present a model that enables us to analyze the running time of an algorithm on a computer with a memory hierarchy with limited associativity, in terms of various cache parameters. Our cache model, an extension of Aggarwal and Vitter's I/O model, enables us to establish useful relationships between the cache complexity and the I/O complexity of computations. As a corollary, we obtain cache-efficient algorithms in the single-level cache model for fundamental problems like sorting, FFT, and an important subclass of permutations. We also analyze the average-case cache behavior of mergesort, show that ignoring associativity concerns could lead to inferior performance, and present supporting experimental evidence.We further extend our model to multiple levels of cache with limited associativity and present optimal algorithms for matrix transpose and sorting. Our techniques may be used for systematic exploitation of the memory hierarchy starting from the algorithm design stage, and for dealing with the hitherto unresolved problem of limited associativity.