This preview shows page 1. Sign up to view the full content.
Unformatted text preview: and 6.33 delve into this issue more deeply. 6.6.3 Using Blocking to Increase Temporal Locality
In the last section we saw how some simple rearrangements of the loops could increase spatial locality. But observe that even with good loop nestings, the time per loop iteration increases with increasing array size. What is happening is that as the array size increases, the temporal locality decreases, and the cache experiences an increasing number of capacity misses. To ﬁx this, we can use a general technique called blocking. However, we must point out that, unlike the simple loop transformations for improving spatial locality, blocking makes the code harder to read and understand. For this reason it is best suited for optimizing compilers or frequently executed library routines. Still, the technique is interesting to study and understand because it is a general concept that can produce big performance gains. The general idea of blocking is to organize the data structures in a program into la...
View Full Document
- Spring '10
- The American