Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Toolchains, Sanitizers, and Benchmarking

Status Draft outlineSection High-Performance C++

Debug, sanitized, profiled, and optimized binaries answer different questions. A believable performance result records the compiler, flags, linked libraries, hardware, operating-system state, workload, and sampling method.

Planned model

Follow one program through warnings, AddressSanitizer, UndefinedBehaviorSanitizer, ThreadSanitizer, optimized assembly inspection, counters, and a benchmark harness.

Questions

  • Which correctness checks are incompatible with a production-speed measurement?
  • Has the optimizer removed the work or moved it outside the timed region?
  • Can another person reproduce the result from the recorded environment?

Exercise

Create a benchmark report template that distinguishes correctness evidence, profiling evidence, and final optimized measurements.