User's Manual

8 Optimization Star
AMD Athlon Processor x86 Code Optimization
22007E/0November 1999
Avoid Placing Code and Data in the Same 64-Byte Cache
Line
Optimization Star
The top optimizations described in this chapter are flagged
with a star. In addition, the star appears beside the more
detailed descriptions found in subsequent chapters.
Group I Optimizations Essential Optimizations
Memory Size and Alignment Issues
See Memory Size and Alignment Issues on page 45 for more
details.
Avoid Memory Size Mismatches
Avoid memory size mismatches when instructions operate on
the same data. For instructions that store and reload the same
data, keep operands aligned and keep the loads/stores of each
operand the same size.
Align Data Where Possible
Avoid misaligned data references. A misaligned store or load
operation suffers a minimum one-cycle penalty in the
AMD Athlon processor load/store pipeline.
Use the 3DNow! PREFETCH and PREFETCHW Instructions
For code that can take advantage of prefetching, use the
3DNow! PREFETCH and PREFETCHW instructions to increase
the effective bandwidth to the AMD Athlon processor, which
significantly improves performance. All the prefetch
instructions are essentially integer instructions and can be used
TOP
TOP
TOP
TOP