Automatic Pool Allocation: Improving Performance by Controlling Data Structure Layout in the Heap
Chris Lattner and Vikram Adve

Abstract:

This paper describes Automatic Pool Allocation, a transformation framework that segregates distinct instances of heap-based data structures into seperate memory pools and allows heuristics to be used to partially control the internal layout of those data structures. The primary goal of this work is performance improvement, not automatic memory management, and the paper makes several new contributions. The key contribution is a new compiler algorithm for partitioning heap objects in imperative programs based on a context-sensitive pointer analysis, including a novel strategy for correct handling of indirect (and potentially unsafe) function calls. The transformation does not require type safe programs and works for the full generality of C and C++. Second, the paper describes several optimizations that exploit data structure partitioning to further improve program performance. Third, the paper evaluates how memory hierarchy behavior and overall program performance are impacted by the new transformations. Using a number of benchmarks and a few applications, we find that compilation times are extremely low, and overall running times for heap intensive programs speed up by 10-25% in many cases, about 2x in two cases, and more than 10x in two small benchmarks. Overall, we believe this work provides a new framework for optimizing pointer intensive programs by segregating and controlling the layout of heap-based data structures.

Published:

"Automatic Pool Allocation: Improving Performance by Controlling Data Structure Layout in the Heap"
Chris Lattner and Vikram Adve.
Proc. of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'05), Chicago, Illinois, Jun, 2005.

Awarded PLDI 2005 Best Paper Award

Download:

Paper:

Slides:

Note, animations do not work in PDF version. Please use PPT version if possible.

Update:

A more recent and expanded version of this work is available in Chris Lattner's Ph.D. Thesis.

BibTeX Entry:

  @InProceedings{PoolAlloc:PLDI05,
    author    = {Chris Lattner and Vikram Adve},
    title     = "{Automatic Pool Allocation: Improving Performance by Controlling Data Structure Layout in the Heap}",
    booktitle = "{Proceedings of the 2005 ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'05)}",
    address   = {Chigago, Illinois},
    month     = {June},
    year      = {2005}
  }

Valid CSS! Valid HTML 4.01!