C++ Game Development - Techniques to Optimise Multithreaded Data Building
Talkat CppCon 2024 · on Tuesday, 2024-09-17· at 15:15· Spruce 3/4, 6700 North Gaylord Rockies Boulevard·
summary
Build system runs on a job/task system on a 16‑physical‑core (32 logical) PC and processes tens of millions of nodes stored in a compact spatial structure. A custom grid cache (fixed-size sparse grid with a spill‑over cell and flat_map storage) reduces repeated IO and lookups. Sorting optimization extracts small sort keys into a secondary array and halves sort time on large data sets. Replacing spinlocks by serializing the save phase via job‑chaining instead of mutex contention cuts wall‑clock build time (example: saving contention drops overall run from ~12s to ~9s). C++17/20 implementation; techniques are practical and proven.
AI-written summary · about
chapters (8)
- 0:00Multithreaded data building intro
- 6:25What is data building
- 11:06Game vs data code differences
- 20:49Spatial data with grid cache
- 25:03Sorting large arrays efficiently
- 31:34Avoiding thread blocking
- 39:31Optimization techniques summary
- 40:54Q&A
related talks
48mConsiderations for choosing the parallel computing strategy
58mCombining Co-Routines and Functions into a Job System
01h 00mIntroduction to Hardware Efficiency in Cpp
52mBest Practices for Concurrency
01h 03m...Scaling Visualization in concurrent C++ programs
01h 05mDecomposing a Problem for Parallel Execution
01h 07mAn Introduction to Multithreading in C++20
49mC++ in Huge AAA Games
