~/talk

Argument Passing, Core Guidelines and Aliasing

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

Slides and benchmarks state that Core Guideline F-16 (pass cheaply copyable types by value, others by const reference) matters because aliasing can change correctness and slow hot loops dramatically: a measured case runs 43× slower when a coefficient is passed by const reference. Tools used include Compiler Explorer and Google Benchmark, and practical fixes shown are std::decay_copy and std::ref/std::bind tricks, plus a C++20 concepts + std::conditional pattern to choose value vs reference at compile time to avoid unnecessary copies and aliasing.

AI-written summary · about

  1. 0:00Intro
  2. 1:42C++ Core Guideline F.16
  3. 3:48Examples
  4. 5:48What About Templates
  5. 6:37What's the Generic Approach (what's in STL)?
  6. 15:14Performance Effect of Aliasing
  7. 19:51Performance Benchmark Results
  8. 21:21Compilers and Aliasing
  9. 31:56Give Power to the Caller
  10. 39:52Herb Sutter's Code
  11. 45:33Potential Approach for Unification
  12. 48:49Summary
~/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.