CPU Cache

Noun · Development

Definitions

  1. Small, extremely fast memory built into the CPU that stores copies of frequently accessed data. Organized in levels: L1 (fastest, smallest, ~32-64KB per core), L2 (~256KB-1MB per core), and L3 (shared, ~8-64MB). Cache-friendly code that accesses memory sequentially can be 100x faster than random access patterns due to cache line prefetching.

    In plain English: A tiny, ultra-fast memory inside the CPU that keeps copies of frequently used data to avoid slow main memory trips.

    Example: "Iterating a 2D array row-by-row is 10x faster than column-by-column because of CPU cache line spatial locality — sequential access patterns hit the cache."

Related Terms