@shmVirus

Memory Hierarchy

Registers, cache levels, RAM, and disk: latency, capacity, and the principle of locality.

Memory is not uniform: registers are fast but tiny; disk is enormous but slow; cache sits between them. This chapter covers the memory hierarchy, the principle of spatial and temporal locality, cache design, and the performance implications for how you write code.