Locality optimization for program instances

The degree of locality of a program reflects the level of temporal and spatial concentration of related data and computations. Locality optimization can speed up programs by reducing the communication costs. A possible human approach to locality optimization is to consider several small program instances of a given program, find optimal or close to optimal mappings of data and computations for the program instances, and generalize them to the program.