Algorithmic and microarchitecture optimizations of C++ applications
summary
A small in‑memory employee DB holding 50 million records starts at baseline 3.9 QPS; changing the filter to return indices and reserving result space removes redundant copies and raises throughput to 9.3 QPS. Converting std::string to fixed char[32], turning array‑of‑structs into structs‑of‑arrays and adding pragmas for vectorization moves it to 24 QPS (Intel compiler 19.0; vitamin profiler and info advisor report vectorization). Parallelizing with Threading Building Blocks yields 130 QPS, exceeding the 30 QPS target while microarchitecture CPI inefficiencies remain.
AI-written summary · about
chapters (17)
- 0:00Start
- 1:22Optimization criteria and stopping condition
- 2:07Optimization Process
- 3:02Build a solid baseline
- 7:06Sample application data flow
- 7:28Sample workload
- 9:23Algorithmic optimization
- 11:05Design optimization
- 17:17Vectorization boundaries
- 18:07Vectorization report
- 23:52Performance gain
- 24:14Parallel execution speedup
- 24:55Threading Building Blocks
- 26:25Bold attempt to parallelize baseline
- 32:09Microarchitecture efficiency
- 33:34Dig deeper?
- 35:23Summary
related talks
35mAlgorithmic and microarchitecture optimizations of C++ applications
57mThis Videogame Programmer Used the STL and You Will Never Guess What Happened Next
05mMaximising Throughput & Minimising Latency in High-Performance C++ Code
44mC++ Performance and Optimisation
01h 04mDesign for Performance
01h 00mMoving Faster: Everyday efficiency in modern C++
49mAn Engineering Approach to Optimising C++
01h 30mTuning C++: Benchmarks, and CPUs, and Compilers! Oh My!
