What is cpu-cache?

A smaller, faster memory which stores copies of the data from frequently used main memory locations.

Contenido pendiente de traducción. Se muestra la versión en inglés.

CPU cache is high-speed static RAM (SRAM) located very close to the processor core. It minimizes the time the CPU spends waiting for data from the slower main memory (DRAM).

        graph LR
  Center["What is cpu-cache?"]:::main
  Rel_caching["caching"]:::related -.-> Center
  click Rel_caching "/terms/caching"
  Rel_file_systems["file-systems"]:::related -.-> Center
  click Rel_file_systems "/terms/file-systems"
  Rel_thread["thread"]:::related -.-> Center
  click Rel_thread "/terms/thread"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧒 Explícalo como si tuviera 5 años

If main memory is like a library across town, the [CPU](/es/terms/cpu) [cache](/es/terms/cache) is like the [stack](/es/terms/stack) of books on your desk. Grabbing a book from your desk is much faster than driving across town!

🤓 Expert Deep Dive

L1 (fastest), L2 and L3 (largest) caches minimize the 'memory wall'. Coherence protocols (MESI) ensure synchronization across cores.

📚 Fuentes