~/talk

C++ RVO: Return Value Optimization for Performance in Bloomberg C++ Codebases

Talkat CppCon 2024 · on Monday, 2024-09-16· at 15:15· Maple 3/4/5, 6700 North Gaylord Rockies Boulevard· [rust]
links:none on file
slides:none on file

Shows concrete examples, assembly and timings that demonstrate RVO mattering: measured loops show ~26% speedup when NRVO is allowed, assembly shows fewer instructions and a smaller stack frame. Reproduces failures (returning parameters, multiple returns, parenthesized or complex expressions, structured bindings, volatile, differing types) and tools/flags that affect it like -fno-elide-constructors and the GCC warning -Wnvo (GCC 14+). Uses GCC/Clang/MSVC builds, prints ctor/copy/move traces, and uses time and generated assembly to prove when RVO actually does and does not occur.

AI-written summary · about

  1. 0:00RVO importance
  2. 2:14What is RVO
  3. 10:24Named vs unnamed RVO
  4. 15:17Move semantics and RVO
  5. 17:27When RVO fails
  6. 20:26Interactive examples
  7. 34:23Exceptions and RVO
  8. 37:20RVO with complex objects
  9. 42:17Structured bindings limits
  10. 44:25Parentheses trick
  11. 47:39RVO standard conditions
  12. 48:00Is RVO micro-optimization?
  13. 49:30Tooling for RVO
  14. 51:15Q&A
~/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.