Previous | Next --- Slide 40 of 90
Back to Lecture Thumbnails
pslui88

This slide is saying that the one benefit of allowing reordering of reads/writes is to make better use of cached data. For example, if a program is sequentially reading in an array two times in a row, but the cache is half the size of the array, then every read will be a cache miss. However, if the compiler could reorder operations so that it executes the reads that read the first half into the cache, then executes the reads that re-read the first half again so that they will all cache-hit. Then, it can execute the reads on the second half of the array, and finally the re-reads on the second half, so that they will also cache hit.

Please log in to leave a comment.