The goal of -prefetch insertion is to reduce cache misses by providing hints to the processor about when data should be loaded into the cache. The prefetching optimizations implement the following options:
-prefetch[-] |
Enable or disable (-prefetch-) prefetch insertion. This option requires that -O3 be specified. The default with -O3 is -prefetch. |
To facilitate compiler optimization:
Minimize use of global variables and pointers.
Minimize use of complex control flow.
Choose data types carefully and avoid type casting.
For more information on how to optimize with -prefetch[-], refer to Intel® Pentium® 4 and Intel® Xeon(TM) Processor Optimization Reference Manual.