Memory Hierarchy Latencies: Orders of Magnitude Slower

Accessing data from the fastest L1 cache takes approximately 1 nanosecond (ns), while L2 cache is ~3-5 ns, L3 cache ~10-15 ns, and main memory (RAM) is a stark ~50-100 ns, making a RAM access potentially 50-100 times slower than an L1 hit.

The top 3

  1. Memory Hierarchy: Astonishing Latency Gaps, From Nanoseconds to Milliseconds: Accessing CPU's L1 cache takes approximately 1 nanosecond, while main memory (DRAM) can take 50-100 nanoseconds. The gap widens significantly for storage: NVMe SSDs are around 50-100 microseconds, and traditional HDDs can be 5-15 milliseconds, spanning seven orders of magnitude in latency.
  2. CPU vs. Memory: The Decades-Long Widening Speed Disparity: Since the 1980s, CPU performance has improved at a rate of 35-60% per year, dramatically outpacing DRAM access time improvements, which have only advanced by 3-10% annually. This persistent disparity has created a growing gap, making memory access a primary bottleneck for modern processors.
  3. Cache Miss Penalties: Thousands of CPU Cycles Lost to Slower Memory: A miss in the ultra-fast L1 cache that hits L2 can cost 3-15 CPU cycles, while an L2 miss reaching L3 may incur 10-40 cycles. If data isn't in any cache and must be fetched from main memory (RAM), the penalty can exceed hundreds of CPU cycles, potentially stalling the processor for hundreds of nanoseconds.

Sources

Open the full topic