Memory Hierarchy
When writing out a large amount of data that will not be read back for a while, what is the main benefit of non-temporal stores that bypass the cache?
- AThe written data stays in the cache longer and is faster to read later
- BThe cache is not filled with data that won't be reused
- CWrite ordering is no longer guaranteed, making program bugs easier to find
Show answer and explanation
Answer: B. The cache is not filled with data that won't be reused
Ordinary stores with write-allocate fetch the line from memory before writing, so even write-only data costs read traffic and evicts other data that will be reused. Non-temporal stores combine writes and send them straight to memory, leaving the cache unpolluted and skipping useless fetches. The data does not stay in the cache, so reading it back soon would be slower. Changed ordering semantics are a caveat, not a benefit.
- A. The data does not stay cached, so reading it soon is actually slower.
- B. Correct. The cache is not filled with non-reused data, and useless fetches are avoided.
- C. Changed ordering is a caveat, not a benefit.