liveBook · Manning

CPU cache

A CPU cache is small, fast memory that stores copies of data or instructions for quicker access by a processor.

How 4 Manning books explain it

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.

Read how Latency explains CPU cache →

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

What to know first

Related concepts

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.