The hardness of cache conscious data placement

Erez Petrank, Dror Rawitz

Research output: Contribution to journalConference articlepeer-review

71 Scopus citations


The growing gap between the speed of memory access and cache access has made cache misses an influential factor in program efficiency. Much effort has been spent recently on reducing the number of cache misses during program run. This effort includes wise rearranging of program code, cache-conscious data placement, and algorithmic modifications that improve the program cache behavior. In this work we investigate the complexity of finding the optimal placement of objects (or code) in the memory, in the sense that this placement reduces the cache misses to the minimum. We show that this problem is one of the toughest amongst the interesting algorithmic problems in computer science. In particular, suppose one is given a sequence of memory accesses and one has to place the data in the memory so as to minimize the number of cache misses for this sequence. We show that if P ≠ NP, then one cannot efficiently approximate the optimal solution even up to a very liberal approximation ratio. Thus, this problem joins the small family of extremely inapproximable optimization problems. The other two famous members in this family are minimum coloring and maximum clique.

Original languageEnglish
Pages (from-to)101-112
Number of pages12
JournalConference Record of the Annual ACM Symposium on Principles of Programming Languages
StatePublished - 2002
Externally publishedYes
EventPOPL 2002: 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages - Portland, OR, United States
Duration: 16 Jan 200218 Jan 2002


  • Cache conscious code rearrangement
  • Cache conscious data placement
  • Computational complexity
  • Hardness of approximation
  • Memory management


Dive into the research topics of 'The hardness of cache conscious data placement'. Together they form a unique fingerprint.

Cite this