~/lightning

Moving an `int` Is Slow: Debug Performance Matters!

Lightningat ACCU 2022 · 2022-04-06..04-09· [c-and-cpp]
slides:none on file

Benchmark shows C++20's std::accumulate uses std::move in assignment and on -O0 that call is not inlined, producing 1.4× slowdown versus C++17 for an int-heavy workload. The concrete cause is that move/forward are ordinary template functions and result in extra function-call overhead in debug builds; workarounds include using -Og (where available), local macro wrappers or manual copying, and pushing compiler changes — GCC now folds moves in the front end while MSVC lacks an equivalent.

AI-written summary · about

  1. 0:00Introduction
  2. 0:50Accumulation
  3. 2:01Functions
  4. 2:45Debugging
  5. 3:53og
  6. 4:24Macros
~/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.