what every programmer should know about memory
(1)原本准备看gdb的英文使用手册,发现看不懂,写的很好,但是想对着动手练习发现进行不下去,懊恼,英文太差了
(2)文章是介绍内存的一篇论文,作者是Ulrich Drepper,论文114页,刚看了个介绍,看每一句的时候大概知道是啥意思,看完了一章节,发现啥都没记住。再去看别人的翻译,翻得真好。
(3)第一遍没看懂,知其然不知其所以然,看了一遍中文再回去看英文。
(4)决定尝试一个方法,在PDF中对着英文将中文用附注的方式写出来,英文先自己看,尝试翻译,如果不通,再去看高手的翻译。
As CPU cores become both faster and more numerous, the limiting factor for most programs is
now, and will be for some time, memory access. Hardware designers have come up with ever
more sophisticated memory handling and acceleration techniques–such as CPU caches–but
these cannot work optimally without some help from the programmer. Unfortunately, neither
the structure nor the cost of using the memory subsystem of a computer or the caches on CPUs
is well understood by most programmers. This paper explains the structure of memory subsystems
in use on modern commodity hardware, illustrating why CPU caches were developed, how
they work, and what programs should do to achieve optimal performance by utilizing them.
随着CPU核心变得越来越快,数量也越来越多,对于大多数程序来说,内存访问在目前并且一段时间内都会是制约因素。硬件设计者设计了更复杂的内存处理和加速技术,比如CPU高速缓存,但是这些需要程序员的帮助才能达到最好的效果。不幸的是,对于一个电脑上使用的内存子系统或者CPU上的高速缓存的成本和结构,绝大多数程序员都不大明白。本文解释了使用在现代商业硬件上的内存子系统的内存结构,说明为什么CPU高速缓存被发明,他们是怎么工作的,然后程序应该利用他们做些什么来获取更好的性能。
–水平有限,仅用于自己提升英语能力和学习内存的知识。