Linkers generate executable object les technically an

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: we have dubbed the memory mountain) that can vary by orders of magnitude. Programs with good locality access most of their data from fast L1 and L2 cache memories. Programs with poor locality access most of their data from the relatively slow DRAM main memory. Programmers who understand the nature of the memory hierarchy can exploit this understanding to write more efficient programs, regardless of the specific memory system organization. In particular, we recommend the following techniques: ¯ ¯ ¯ ¯ Focus your attention on the inner loops where the bulk of the computations and memory accesses occur. Try to maximize the spatial locality in your programs by reading data objects sequentially, in the order they are stored in memory. Try to maximize the temporal locality in your programs by using a data object as often as possible once it has been read from memory. Remember that miss rates are only one (albeit important) factor that determines the performance of your code. The number of memory accesses also plays an important role, and somet...
View Full Document

Ask a homework question - tutors are online