Cache-conscious structure layout
- 1 May 1999
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 34 (5) , 1-12
- https://doi.org/10.1145/301631.301633
Abstract
Hardware trends have produced an increasing disparity between processor speeds and memory access times. While a variety of techniques for tolerating or reducing memory latency have been proposed, these are rarely successful for pointer-manipulating programs.This paper explores a complementary approach that attacks the source (poor reference locality) of the problem rather than its manifestation (memory latency). It demonstrates that careful data organization and layout provides an essential mechanism to improve the cache locality of pointer-manipulating programs and consequently, their performance. It explores two placement techniques---clusteringandcoloring---that improve cache performance by increasing a pointer structure's spatial and temporal locality, and by reducing cache-conflicts.To reduce the cost of applying these techniques, this paper discusses two strategies---cache-conscious reorganizationandcache-conscious allocation---and describes two semi-automatic tools---ccmorph and ccmalloc---that use these strategies to produce cache-conscious pointer structure layouts. ccmorph is a transparent tree reorganizer that utilizes topology information to cluster and color the structure. ccmalloc is a cache-conscious heap allocator that attempts to co-locate contemporaneously accessed data elements in the same physical cache block. Our evaluations, with microbenchmarks, several small benchmarks, and a couple of large real-world applications, demonstrate that the cache-conscious structure layouts produced by ccmorph and ccmalloc offer large performance benefits---in most cases, significantly outperforming state-of-the-art prefetching.Keywords
This publication has 41 references indexed in Scilit:
- Cache-conscious structure definitionPublished by Association for Computing Machinery (ACM) ,1999
- Cache-conscious data placementPublished by Association for Computing Machinery (ACM) ,1998
- Using generational garbage collection to implement cache-conscious data placementPublished by Association for Computing Machinery (ACM) ,1998
- Memory bandwidth limitations of future microprocessorsPublished by Association for Computing Machinery (ACM) ,1996
- Compiler optimizations for improving data localityPublished by Association for Computing Machinery (ACM) ,1994
- Software prefetchingPublished by Association for Computing Machinery (ACM) ,1991
- An analytical cache modelACM Transactions on Computer Systems, 1989
- Clustering a DAG for CAD databasesIEEE Transactions on Software Engineering, 1988
- Organization and maintenance of large ordered indexesActa Informatica, 1972
- Principles of Optimal Page ReplacementJournal of the ACM, 1971