Expert · Module 14
Performance, ABI and Expert Craft
Read caches and profiles, respect the ABI across library boundaries, and structure large codebases by the Core Guidelines.
Fast code is not clever code; it is code that respects the machine and its readers. This module covers cache-conscious layout, profiling before optimizing, ABI stability at library boundaries, and practical design guidance. Its examples use a small set of patterns only where they make ownership, configuration or measurement easier to reason about; no external pattern notes are required.
- 1Caches and False Sharing: Layout for SpeedPro — members onlyKeep hot data on its own cache line, split counters per thread, and prove the speedup with the honest benchmark harness.11 min
- 2Profiling With perf and Reading Flame GraphsPro — members onlyRecord with linux perf, read report output, build flame graphs, and turn hot stacks into layout and algorithm fixes.10 min
- 3The ABI: Name Mangling, Layout and Library BoundariesPro — members onlyDecode mangled names, track class layout and alignment, and follow inline and versioning rules that keep shipped libraries compatible.11 min
- 4Core Guidelines and Design Patterns, AppliedPro — members onlyApply C++ Core Guidelines essentials and use creational, structural and behavioral patterns sparingly to structure pool, queue and harness code.12 min