Introduction to Hardware Efficiency in Cpp
summary
Code is either CPU‑bound or memory‑bound and the talk shows concrete fixes and measurements: use profilers VTune uProf perf to classify bottlenecks, convert array‑of‑structs to struct‑of‑arrays — 194ms → 42ms (≈4×), interchange matrix loops — 5.8s → 1.22s (≈4.7×), and enable compiler vectorization which typically yields 2–6× speedups. Replacing vector<ptr> with contiguous values and using custom allocators or node packing makes traversal 10–20× faster in examples. Compiler optimization reports and specific flags reveal why changes work.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:22Making software fast
- 3:05Better Usage of Hardware Resources
- 7:05Computationally intensive or memory intensive?
- 11:33Fixing memory intensive codes - SOA
- 14:28Fixing memory intensive codes (3)
- 18:24Introduction to vectorization
- 22:41Prerequisites for autovectorization
- 28:18Fixes for vectorization problems
- 34:59When do data cache misses typically happen?
- 40:18Example: Minimum and maximum in array
- 45:31Why is perfect memory layout the fastest?
- 50:25Experiment with class size and member layout
related talks
01h 01mWant fast C++? Know your hardware!
01h 14mEfficiency with Algorithms, Performance with Data Structures
01h 06mUtilize your CPU power
01h 09mComputer Architecture, C++, and High Performance
42mFaster programs with your compilers autovectorization feature
32mOptimizing Away C++ Virtual Functions May Be Pointless
01h 04mCPU design effects
01h 01mHigh performance data structures in boost
