Factor 3: Cache Memory (L1, L2, L3)

Test yourself on CPU Performance with exam style questions, marked instantly.

Flashcards that come back just before you would forget them.

A revision plan that remembers what you know and shows what to do next.

See which topics you have nailed and which need another look.

Quiz yourself on CPU PerformanceGet your flashcardsBuild my revision planTrack my progress

Factor 3: Cache Memory (L1, L2, L3)

What It Is:

Cache is a small amount of very fast memory built directly into the CPU chip. It stores frequently-used data and instructions so the CPU doesn't have to wait for slower RAM.

Cache Levels:

  • L1 Cache: Smallest (32-128 KB per core), fastest, located closest to CPU cores. Separate for instructions and data.
  • L2 Cache: Medium (256 KB - 1 MB per core), slightly slower than L1, still very fast.
  • L3 Cache: Largest (4-64 MB shared across all cores), slowest cache level but still much faster than RAM.

How It Works:

  • When CPU needs data, it checks L1 first (fastest)
  • If not in L1, checks L2
  • If not in L2, checks L3
  • If not in any cache, fetches from RAM (slowest) - called a "cache miss"
  • Cache hit rate: % of time data is found in cache (higher is better)

How It Affects Performance:

  • More cache = fewer RAM accesses = faster performance
  • Cache is 50-100x faster than RAM!
  • Example: L1 cache access = ~4 clock cycles, RAM access = ~200 clock cycles
  • Larger cache means more data can be kept close to CPU

Make this stick

Signing in gives access to all PrepWise features.

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.