CPU cache
A CPU cache is small, fast memory that stores copies of data or instructions for quicker access by a processor.
Fast Python: High performance techniques for large datasets
- How it is used
- Explains data-processing performance through cache locality and the gap between processor and RAM speeds.
- How deep it goes
- Explains cache hits and neighboring-data transfers using a simplified matrix traversal, with cache size and representation as qualifications.
- Examples
- Compares NumPy row and column doubling and reports NumExpr speedups on a server and a laptop.
- What you can do after
- Diagnose cache-sensitive performance by benchmarking array access patterns and testing optimizations on the target machine.
Read how Fast Python: High performance techniques for large datasets explains CPU cache →
100 Go Mistakes and How to Avoid Them
A CPU cache is small, fast hardware memory that stores recently accessed data and instructions near a processor core.
- How it is used
- Uses CPU caches to explain performance choices in CPU-bound and data-intensive Go applications.
- How deep it goes
- Explains cache levels, access latency, cache lines, and set-associative placement through a matrix benchmark.
- Examples
- Compares Go matrix sums using 512- and 513-column rows and illustrates the Intel Core i5-7300 cache hierarchy.
- What you can do after
- Diagnose/debug cache-sensitive performance by considering data layout, access stride, and cache placement.
Read how 100 Go Mistakes and How to Avoid Them explains CPU cache →
Latency
A CPU cache is a small, fast memory that stores copies of data likely to be accessed by a CPU.
- How it is used
- Guides low-latency data placement and working-set design on multicore and NUMA systems.
- How deep it goes
- Explains cache levels, approximate capacities and latencies, working-set fit, and interactions with execution stalls.
- Examples
- Uses L1 latency and capacity, LLC size, DRAM slowdown, NUMA locality, and speculative branch execution as concrete cases.
- What you can do after
- Evaluate/understand why fitting frequently accessed data within the LLC can improve latency and reduce memory stalls.
High Performance Unity Game Development
A small, fast memory near a processor core that stores data for quicker access than main memory.
- How it is used
- Explains why gameplay performance can be limited by retrieving data rather than performing calculations.
- How deep it goes
- Defines caches and explains their role in reducing waits, without detailing cache hierarchy or hardware behavior.
- Examples
- Uses enemy movement, calculated from position, direction, and velocity, to illustrate data-access delays.
- What you can do after
- Understand how organizing data can help the CPU use its cache and reduce trips to main memory.
Read how High Performance Unity Game Development explains CPU cache →
Also covered in
- GPU Programming with TritonIn early access (MEAP)
- The Coder CafeIn early access (MEAP)
What to know first
- CPUA central processing unit (CPU) is a computer processor that executes program instructions and performs general-purpose computational operations.
- meanThe mean is a measure of central location equal to the arithmetic average of numerical observations, or the probability-weighted average of a random variable’s possible values.
- performancePerformance is a measure of how effectively a person, process, model, or system achieves its objectives, including qualities such as output quality, speed, and resource efficiency.
- hardwareHardware is the physical equipment and components of a computing system, including processors, memory, storage, and peripherals.
Related concepts
- L2 cacheincludes · An L2 cache is a second-level hardware cache that stores copies of data to reduce memory-access costs and is typically larger and slower than L1 cache.
- constant memoryused by · Constant memory is a read-only CUDA memory space backed by device DRAM, with a limited address space and a dedicated cache near the streaming multiprocessors.
- L1 cacheincludes · An L1 cache is the smallest, lowest-latency level of a processor’s cache hierarchy, located closest to a processing core.
- cache linehas part · A cache line is a fixed-size block of contiguous memory that a cache transfers or manages as a unit.
- memory hierarchypart of · A memory hierarchy is an arrangement of storage levels with differing capacities, access speeds, latencies, costs, or persistence.
- data-oriented programmingused by · Data-oriented programming is an approach to structuring software around data representations and the operations, access patterns, and transformations applied to them.
Questions about CPU cache
What is CPU cache?
A CPU cache is small, fast memory that stores copies of data or instructions for quicker access by a processor.
Which Manning books explain CPU cache?
Fast Python: High performance techniques for large datasets, 100 Go Mistakes and How to Avoid Them, Latency and High Performance Unity Game Development.
What should I know before learning CPU cache?
Manning books that teach CPU cache usually introduce CPU, mean, performance and hardware first.
What kinds of CPU cache are there?
Kinds of CPU cache include L2 cache and L1 cache.
What is CPU cache part of?
CPU cache is part of memory hierarchy. A memory hierarchy is an arrangement of storage levels with differing capacities, access speeds, latencies, costs, or persistence.
What are the parts of CPU cache?
CPU cache includes cache line.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



