~/talk

C++ Costless Abstractions: the compiler view

Talkat CppCon 2016 · 2016-09-18..09-23· [compilers-and-language-design, c-and-cpp]
links:none on file
slides:none on file

Shows concrete compiler behavior using Clang++/LLVM bitcode and small C++ snippets: constexpr Fibonacci costs about 1s compile vs 3ms run because the compiler interprets templates at compile time; inlining and constant folding remove layers; passing by reference emits loads/stores while pass-by-value avoids memory traffic; static/anonymous linkage enables aggressive optimization; lambdas lower to returned closure state; copy elision and builtin memcpy replace obvious copies; std::vector initialized at startup runs code before main; noexcept/no unwind and devirtualization change call overhead.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 6:29Compiler basics and disclaimers
  3. 7:35Functions and abstractions
  4. 10:43Inlining control and hints
  5. 16:42Tag dispatching and lambdas
  6. 20:53Data boxing and unboxing
  7. 24:10Member functions and copy elision
  8. 27:40Virtual methods and performance
  9. 30:01Controversial STL features
  10. 36:22Memory management and exceptions
  11. 39:35Vectorization and HPC
  12. 40:42Compiler communication and flags
  13. 42:26Q&A and closing remarks
~/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.