Data memory references similarly follow the principle of locality. Scalars that are used over and over again like loop counters and accumulators, such as sum in Fig. 12.4.1, obviously form regions that are hot spots. Also, large programs often manipulate data in one or two-dimensional arrays, and programs frequently move about in fairly small regions of these arrays before moving on to a different region. The principle of locality can thus be seen in action in both data memory and instruction memory. |