Intel ARCHITECTURE IA-32 User Manual Page 128

  • Download
  • Add to my manuals
  • Print
  • Page
    / 568
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 127
IA-32 Intel® Architecture Optimization
2-56
access patterns to suit the hardware prefetcher is highly recommended,
and should be a higher-priority consideration than using software
prefetch instructions.
The hardware prefetcher is best for small-stride data access patterns in
either direction with cache-miss stride not far from 64 bytes. This is true
for data accesses to addresses that are either known or unknown at the
time of issuing the load operations. Software prefetch can complement
the hardware prefetcher if used carefully.
There is a trade-off to make between hardware and software
prefetching. This pertains to application characteristics such as
regularity and stride of accesses. Bus bandwidth, issue bandwidth (the
latency of loads on the critical path) and whether access patterns are
suitable for non-temporal prefetch will also have an impact.
For a detailed description of how to use prefetching, see Chapter 6,
“Optimizing Cache Usage”.
User/Source Coding Rule 9. (M impact, H generality) Enable the prefetch
generation in your compiler. Note: As a compilers prefetch implementation
improves, it is expected that its prefetch insertion will outperform manual
insertion except for that done by code tuning experts, but this is not always the
case. If the compiler does not support software prefetching, intrinsics or inline
assembly may be used to manually insert prefetch instructions.
Chapter 6 contains an example of using software prefetch to implement
memory copy algorithm.
Tuning Suggestion 2. If a load is found to miss frequently, either insert a
prefetch before it, or, if issue bandwidth is a concern, move the load up to
execute earlier.
Cacheability Instructions
SSE2 provides additional cacheability instructions that extend further
from the cacheability instructions provided in SSE. The new
cacheability instructions include:
new streaming store instructions
Page view 127
1 2 ... 123 124 125 126 127 128 129 130 131 132 133 ... 567 568

Comments to this Manuals

No comments