Code Reorganization for Instruction Caches

A. Dain Samples and Paul N. Hilfinger

Program performance can be improved on machines with virtual memory by reorganizing the program's address space. We address the question whether reorganization could benefit programs on machines with instruction caches. We have performed experiments to determine the efficacy of restructuring using simple reordering algorithms and profile data, concluding that performance improvement can be obtained relatively cheaply. Experiments show improvements in miss rates on the order 30% to 50%, and sometimes as high as 50% to 80%, by performing a simple algorithm that relocates only 3% to 8% of the basic blocks of a program.

BibTeX citation:

@techreport{Samples:CSD-88-447,
Author = {Samples, A. Dain and Hilfinger, Paul N.},
Title = {Code Reorganization for Instruction Caches},
Institution = {EECS Department, University of California, Berkeley},
Year = {1988},
Month = {Oct},
URL = {http://www.eecs.berkeley.edu/Pubs/TechRpts/1988/5757.html},
Number = {UCB/CSD-88-447},
Abstract = {Program performance can be improved on machines with virtual memory by reorganizing the program's address space. We address the question whether reorganization could benefit programs on machines with instruction caches. We have performed experiments to determine the efficacy of restructuring using simple reordering algorithms and profile data, concluding that performance improvement can be obtained relatively cheaply. Experiments show improvements in miss rates on the order 30% to 50%, and sometimes as high as 50% to 80%, by performing a simple algorithm that relocates only 3% to 8% of the basic blocks of a program.}
}