Splitting Data Objects to Increase Cache Utilization ( Preliminary Version , 9 th October 1998 )

We present a technique to increase data cache utilization of pointer-based programs. These caches are often underutilized when an algorithm accesses certain data-members much more frequently than others. In programs that allocate large numbers of identical objects, this can result in some cache lines becoming very busy, whereas others are left virtually untouched because ÒcoldÓ program data is mapped onto them. Our solution consists of grouping all the frequently accessed data members together and physically separating them from the less frequently accessed ones. Each object gets split into a ÒhotÓ part and zero or more ÒcoldÓ parts of equal size, which are evenly spaced from each other in memory, facilitating simple address calculation. The hot parts of different objects can then be allocated contiguously, evenly tiling the data cache and thereby increasing its utilization. Our technique is fully automatic, based on profiling, and extends earlier work on automated cache-conscious storage layout of dynamically allocated data structures. It is applicable to all type-safe programming languages that completely abstract from physical storage layout; examples of such languages are Java and Oberon.