~/talk

Is std::function really the best we can do?

Talkat Meeting C++ 2017 · 2017-11-09..11-11· [rust]
slides:none on file

Shows that std::function has predictable runtime and memory overhead and that replacing it with template-based delegates plus small-object in-place storage (using placement new) can be much faster and smaller. Implements and compares designs: raw function-pointer, capture-object, and specialized-template delegates with in-place storage, and presents microbenchmarks and code showing up to 6× speedups and large memory savings for small callables, plus guidance on when those alternatives are safe versus when std::function’s generality is worth the cost.

AI-written summary · about

  1. 0:00std::function limitations
  2. 5:49Why std::function feels magic
  3. 12:06Lambda capture mechanics
  4. 21:24Function pointers vs std::function
  5. 27:03Performance trade-offs
  6. 35:13Memory optimization
  7. 42:18Real-world abstractions
  8. 49:08Alternatives to std::function
  9. 57:47Q&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.