Performance
Profile first: free-recall review
Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what makes the material stick.
Reconstruct the unit’s core mechanisms — the measurement loop, Amdahl’s ceiling, self vs cum-time, scope selection, the observer effect, statistical baselines, and hardware counters — without looking back at the lessons.
- 01List the seven steps of the measurement loop and explain why skipping the baseline or the hypothesis turns it back into guessing.
- 02State Amdahl's law, and explain why a 10x microbenchmark win can produce a 1.05x application speedup.
- 03What is the difference between self-time and cum-time, and what action does each reading suggest?
- 04Why must you verify the profiler's overhead is within ~5% of the baseline headline metric before trusting a profile (the observer effect)?
- 05Why is a single benchmark run never a measurement, and what should be reported instead?
- 06What do hardware performance counters add on top of a flame graph, and how does IPC change the fix you choose?
If you could reconstruct each answer from memory, you hold the unit’s spine: the measurement loop is the scaffold (reproduce → baseline → read → hypothesise → fix → diff → ship); Amdahl’s ceiling decides whether a fix is worth it (share beats local speedup); self vs cum-time tells you where to look; the observer effect tells you which profiler to trust; statistical baselines tell you whether a win is real; and hardware counters tell you why a function is hot and therefore which fix to reach for. Measurement over intuition, every time.