~/lightning

Lightning Talk: Source/Sink vs. Ranges in C++ - What's the Difference?

Lightningat C++Now 2023 · 2023-05-07..05-12· [c-and-cpp]
slides:none on file

Quick experiments in Compiler Explorer compare a standard std::copy implementation to versions that use explicit source/sink functions and small optional-wrapping lambdas. The compiler emits a single optimized memcpy for the simple loop, for the sink/source wrapper, and even when stacking three layers, showing the optimizer collapses the abstractions to one memcpy. Examples include the exact code patterns used, generated asm output, and the surprising “one memcpy” count across variants.

AI-written summary · about

  1. 0:00Analyzing compiler behavior
  2. 1:55Implementing custom sinks
  3. 2:31Source and sink abstractions
~/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.