Locality means the computer tend to reference data items that are near other recently referenced data items or that were referenced themselves.
- temporal locality: programs that repeatedly reference the same variables enjoy good temporal locality.
- spatial locality: for programs with stride-k reference patterns, the smaller the stride, the better the spatial locality.
Practices: