~/talk

to pass and return, the story of functions, values and compilers

Talkat Meeting C++ 2021 · 2021-11-10..11-12· [rust]
links:none on file
slides:none on file

Compilers and experiments decide: code and measurements show that everything becomes a value at the machine level — registers or pointers, tests use gcc clang icc and MSVC on x86_64 via Compiler Explorer with max optimization and C++20, and two compilers (gcc and clang) routinely elide copies while icc and especially MSVC sometimes produces one or two full copies or temporaries for 16–40 byte and larger objects. C++17 mandates prvalue elision, but real builds reveal surprising deviations and concrete register/stack calling details.

AI-written summary · about

  1. 0:00Introduction
  2. 1:45Ways to pass and return
  3. 2:29Everything is passed by value
  4. 11:35Returning by value
  5. 16:40MSVC
  6. 20:35Mental model
  7. 25:42Michael Timon
  8. 26:28Full copy allegiance
  9. 30:02String
  10. 34:40Assignment
  11. 46:12Passing by value
  12. 54:14Passing by reference
  13. 55:47Questions
~/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.