~/talk

Performance-related coding guidelines

Talkat Core C++ 2023 · 2023-06-05..06-07· [c-and-cpp]
name:Dor Rozen
links:none on file
links:none on file
slides:none on file

Benchmarks on a dedicated machine (each run 7 times) compare vector vs list vs deque across push_back, random insert/remove, linear search and sort for 1 byte and 4 KB element sizes. Results: vector wins for small elements due to cache locality, list performs worst for 1 byte but becomes fastest for 4 KB elements, deque often sits between and can be ~2x faster than vector on front inserts. Using reserve avoids costly realloc + copies, noexcept moves and move constructors cut runtimes (observed ~2–3x speedup), and compile‑time work with constexpr + string_view + std::array removes runtime overhead.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:07Data structure performance comparison
  3. 5:53Spatial locality and caching
  4. 12:48Element size impact on performance
  5. 16:28Should we avoid linked lists?
  6. 21:10Memory allocation and reserve
  7. 26:24Vector vs deque vs list summary
  8. 27:53Transition to non-trivial types
  9. 31:11Move semantics in containers
  10. 35:33Compile-time optimizations
  11. 41:35C++20 constexpr utilities
  12. 46:35Q&A and closing remarks
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.