Learn C++ STL

Lesson 3 of 9 · Under the Hood: Memory, Cache, Allocators and the Guarantees

Module 17 · Under the Hood: Memory, Cache, Allocators and the Guarantees

Cache, Equal Work, and One Measured Lab

ProReading

Kenji changes a library report from vector to list because both scans are O(n). The report becomes slower on his machine. Maria asks what the symbol left out. This lesson measures one workload, then connects its observations to memory layout.

Checking what this lesson needs for you…

What is inside Cache, Equal Work, and One Measured Lab

  1. A cache rewards nearby reads
  2. Equal results come before timing
  3. One fair lab, with a narrow claim
  4. Use the result in a real report