~/talk

Using STL containers efficiently

Talkat CppCon 2016 · 2016-09-18..09-23· [databases]
links:none on file
slides:none on file

Practical recipes for faster STL use: avoid needless copies by preferring pass-by-reference and implementing a copy-on-write with atomic refcount for large returnable objects; prefer contiguous storage (vector) and implement erase-by-swap (copy last element over deleted slot then pop_back) instead of middle erases; avoid deep copies while holding locks by swapping with a dummy vector; instrument std::map in huge codebases (100 million LOC) to find hot keys and replace repeated lookups with a single-entry cache for huge speedups.

AI-written summary · about

  1. 0:00Introduction
  2. 0:40Optimization
  3. 1:15Common mistakes
  4. 2:32Vectors
  5. 3:17Legacy
~/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.