~/talk

The Surprising Costs of void() (and Other Not-Quite-Innocuous Evils)

Talkat CppCon 2020 · 2020-09-14..09-18· [software-architecture]
links:none on file
slides:none on file

Shows that plain void() functions with no inputs or outputs often hide mutations and global-state plumbing, leading to unclear interfaces and wasted work; unnecessary default-initialization can add runtime costs; removing an unneeded virtual can save 8-byte per-object vtable cost (40→32 bytes in an example); capturing locals by reference in lambdas and C-style casts across calling conventions produce silent UB that sometimes “works” under some compilers; examples come from anonymized intern code and real product docs, and compilers/optimizers plus Visual Studio static analysis partly detect but don’t eliminate these pitfalls.

AI-written summary · about

  1. 0:00Introduction and context
  2. 2:11Analyzing code smells
  3. 5:00Void functions and signatures
  4. 7:27Contextual meaning in code
  5. 10:41Virtual functions and design
  6. 13:04Optimizing class hierarchies
  7. 16:33Unnecessary initialization
  8. 20:51Efficient variable usage
  9. 27:35Control flow and initialization
  10. 30:16Interfaces and defaults
  11. 34:29Error handling and design
  12. 37:12Const correctness
  13. 40:54Avoiding shortcuts and hacks
  14. 50:15Lambda pitfalls and conclusion
~/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.