《CSAPP》存储器层次结构:在程序中利用局部性
2010-06-27 23:39
267 查看
在学习csapp, 看完了第六章。标记一下, 所以直接引用csapp书中内容了:
Putting It Together: Exploiting Locality in Your Programs (The Impact of Caches on Program Performance)
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 sometimes it is
necessary to trade off between the two.
Putting It Together: Exploiting Locality in Your Programs (The Impact of Caches on Program Performance)
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 sometimes it is
necessary to trade off between the two.
相关文章推荐
- [置顶] [CSAPP笔记][第六章存储器层次结构]
- 程序性能优化探讨(3)——存储器层次结构与高速缓存
- CSAPP(4):存储器层次结构
- 【CSAPP笔记】11. 存储器层次结构
- 11、深入理解计算机系统笔记:存储器层次结构,利用局部性
- 存储器层次结构——基于存储器的程序优化
- CSAPP第六章-存储器的层次结构
- 【操作系统】存储器的层次结构、程序的装入和链接
- CSAPP 第六章-存储器层次结构 小结
- CSAPP阅读笔记(3)-存储器层次结构
- [CSAPP笔记][第六章存储器层次结构]
- 《深入理解计算机系统》 第六章 存储器层次结构
- 第六章存储器层次结构 学习报告
- 自己实现遍历文件层次结构程序
- 什么是内存(一):存储器层次结构
- 随笔八:存储器层次结构
- 存储器层次结构基础(一)
- 深入理解计算机系统--存储器层次结构
- 利用一个简单的递归实现打印目录的层次结构
- CSAPP--存储器及程序的局部性