Software prefetch and cache blocking techniques – Intel ARCHITECTURE IA-32 User Manual

Page 324

Advertising
background image

IA-32 Intel® Architecture Optimization

6-34

Software Prefetch and Cache Blocking Techniques

Cache blocking techniques, such as strip-mining, are used to improve
temporal locality, and thereby cache hit rate. Strip-mining is a
one-dimensional temporal locality optimization for memory. When
two-dimensional arrays are used in programs, loop blocking technique
(similar to strip-mining but in two dimensions) can be applied for a
better memory performance.

If an application uses a large data set that can be reused across multiple
passes of a loop, it will benefit from strip mining: data sets larger than
the cache will be processed in groups small enough to fit into cache.
This allows temporal data to reside in the cache longer, reducing bus
traffic.

Data set size and temporal locality (data characteristics) fundamentally
affect how prefetch instructions are applied to strip-mined code.
Figure 6-6 shows two simplified scenarios for temporally-adjacent data
and temporally-non-adjacent data.

Advertising