~/talk

This Videogame Programmer Used the STL and You Will Never Guess What Happened Next

Talkat CppCon 2019 · 2019-09-15..09-20· [game-development, c-and-cpp]
slides:none on file

A production CPU‑bound game uses the STL and finds concrete tradeoffs: vector wins for hot data because of cache locality and sometimes outperforms map/set for small sizes, so vectors beat maps for small sets. Benchmarks with quickbench show debug builds 4–7× slower and unoptimized C++ up to ~26× slower, while enabling minimal optimization (-O1/-Og) restores and can even beat plain C, so enable -O1 (minimal optimization) and C++ can beat C. Alternatives used: small-buffer/SmallVector, fixed‑capacity proposals (static_vector), and open‑address hash tables; also note modulus is slow — use alternative bucket mapping and use VTune or MS profiler to prove issues.

AI-written summary · about

  1. 0:00Start
  2. 2:42Case against the Stl
  3. 20:07Vector
  4. 23:02What Are the Limitations of Vector
  5. 30:29Dropping Constraints
  6. 48:39Is It Okay To Make Dynamic Allocation in Game Logic
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.