
Software Optimization Guide for AMD64 Processors | 25112 Rev. 3.06 September 2005 |
5.7Streaming-Store/Non-Temporal Instructions
Optimization
Use streaming store instructions such as MOVNTPS and MOVNTQ when writing arrays or buffers which do not need to reside in cache. These instructions allow the processor to perform a write without first reading the data from memory or other processor's caches. This saves the time needed to read the cache line, and also prevents evicting data from the cache which may be needed. This can be a significant performance advantage. These instructions are available in most compilers using inline assembly or intrinsics. Routines 5 and 6 in Section 5.13, “Appropriate Memory Copying Routines” illustrate using the combination of streaming store instructions with the PREFETCHNTA instruction to optimize memory copy routines.
Application
This optimization applies to:
•
•
Rationale
Streaming store instructions are also sometimes called
Be sure to follow the last
Streaming Store instructions are also discussed in
Appendix B, "Implementation of
112 | Cache and Memory Optimizations | Chapter 5 |