An Engineering Approach to Optimising C++
summary
Optimises the open-source Tracktion Engine by adding continuous benchmarking (Google Benchmark/Quickbench) run on GitHub Actions + cloud SQL to track wall-clock and CPU-cycle (rdtsc) metrics; shows compiler flags (O3, -ffast-math) yield ~4x SIMD gains and chrono vs rdtsc timing differences. Replaces an O(N) ID search with a monotonic allocator for a 100x speedup, uses reserve/ctor to get ~2x vector gains, and finds a runtime memory allocator reduces memory by ~40% but can slow real-time threads due to contention.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:27Engineering vs programming in C++
- 2:30Digital audio systems overview
- 5:40Benchmarking in C++ intro
- 8:52Wall clock vs CPU cycles
- 10:38Benchmarking system evolution
- 15:54Performance optimization tools
- 21:07Avoiding unnecessary work
- 23:57SIMD and algorithm changes
- 28:34Algorithmic complexity reduction
- 33:53Caching strategies
- 35:42Memory footprint reduction
- 37:26Multi-threading in audio
- 47:39Conclusion and key takeaways
related talks
01h 30mTuning C++: Benchmarks, and CPUs, and Compilers! Oh My!
35mAlgorithmic and microarchitecture optimizations of C++ applications
01h 00mMoving Faster: Everyday efficiency in modern C++
01h 01mPlenary: Performance Matters
49mAlgorithmic and microarchitecture optimizations of C++ applications
01h 06m“Improving Performance Through Compiler Switches..."
01h 04mDesign for Performance
45mPerformance Benchmarking with Celero
