15-745 Optimizing Compilers For Modern Architectures, SCS, CMU

Project Page

Cache-Sensitive Optimization of Immutable Graph Traversal

By Uri Dekel and Brett Meyer


Following are all the documents we produced:


This project strives to demonstrate the potential benefits of improving the cache locality of programs which frequently traverse an immutable data structure. In our approach, the compiler generates code to fold the inherently noncontiguous representation of each node in a mutable structure into a more contiguous representation possible only for immutable structures. For instance, a mutable graph structure in which nodes maintain linked lists of edges could be transformed into a structure where each node maintains its edges internally in a fixed array. Such a representation yields improved performance due to better cache locality and a decrease in pointer dereferencing operations. It also opens the door to external reorganizations of the nodes.

In the limited scope of this class, our report presents results on potential improvements to manually optimized programs, and discusses the feasibility and usefulness of implementing such optimizations in compilers. Our focus is limited to the example of graphs.