Exceptions Under the Spotlight
summary
Surveys show over 54% of projects (especially embedded) cannot use C++ exceptions freely; a microbenchmark reports 435x slower throws vs return codes on thrown paths and larger binary size on ARM. GCC’s table-based unwind emits RTTI, catch tables and landing pads that inflate binaries and cold-path runtime; MSVC uses frame-based code unwinding with different tradeoffs. A PoC replaces dynamic allocation with a preallocated exception buffer and short-circuits unwind, reaching runtimes close to return-value approaches. Papers discussed propose stack-returned error values and low-cost deterministic, signal-less exception designs.
AI-written summary · about
chapters (8)
- 0:00Introduction and motivation
- 4:50Basics of exceptions
- 7:46History of error handling
- 15:15Exception overhead explained
- 26:33Exception mechanism design
- 32:38Alternatives to exceptions
- 41:29Future of exception handling
- 51:19Call to rethink exceptions
related talks
59m“The Exception Situation"
01h 00mThe Dawn of a New Error
01h 35mMongrel Monads, Dirty, Dirty, Dirty
57m“The Unexceptional Exceptions"
40mLessons from two decades of writing bad code
59mSoftware Engineering Is About Tradeoffs
01h 04mMaking C++ and the STL Work in the Linux / Windows Kernels
01h 03mApplied Best Practices
