Overview

Because it is impossible to build a memory that is both massive and extremely fast, modern CPUs use a hierarchy of increasingly larger but slower caches to bridge the gap between the CPU and RAM.

Levels

  • L1 Cache: Tiny, extremely fast, integrated into each core.
  • L2 Cache: Larger, slightly slower, usually dedicated to each core.
  • L3 Cache: Large, shared among all cores, located on the CPU die.
  • L4 Cache: Rare, sometimes found on the motherboard or as a separate die (e.g., Intel's eDRAM).

Goal

The hierarchy aims to ensure that the data the CPU needs is found in the fastest possible level (a 'cache hit') as often as possible.

Related Terms