Object-oriented programs rely heavily on objects and pointers, making them vulnerable to slowdowns from cache and TLB misses. The cache and TLB behavior depends on the data layout of objects in memory. There are many possible data layouts with different impacts on performance, but it is not known which perform better. This paper presents a novel framework for evaluating data layouts. The framework both makes implementing many layouts easy, and enables performance measurements of real programs using a product Java virtual machine on stock hardware. This is achieved by sorting objects during copying garbage collection; outside of garbage collection, program performance is solely determined by the data layout that the sort key implements. This paper surveys and evaluates 10 common data layouts with 32 realistic benchmark programs running on 3 different hardware configurations. The results confirm the importance of data layouts for program performance, and show that almost all layouts yield the best performance for some programs and the worst performance for others.
Garbage Collection for Program Locality Hirzel REF ] uses a moving garbage collector in order to implement several data layouts of object oriented programs and evaluate which layout presents the best performance.
Data layouts for object-oriented programs
SIGMETRICS '07
Computer Science