C++ MythBusters
summary
Claims and evidence: sprintf uses the global locale and a mutex so switching to libformat gives ~3–4× speedups on macOS and ~20× on Windows in a cited case; std::regex is slow to compile and at runtime so prefer ctre for compile-time regexes; std::optional usually lets compilers optimize away overhead but hoisting can add copies so measure; std::move is just a cast, moves occur on construction/assignment; prefer the pass-by-value sink pattern for multiple arguments; tooling (clang, sanitizers, fuzzers, static analyzers) is mature.
AI-written summary · about
chapters (17)
- 0:00Start
- 4:13The Elephant Metaphor
- 10:53Improv Session
- 16:38Printf
- 18:57Lib Format or Standard Format
- 19:56Myth 14 C plus Plus Is Not Easily Toolable
- 21:45Testing Frameworks
- 22:10Static Analyzer
- 26:03Regex Standard Regex Is Too Slow for Production Use
- 30:23Standard Regex Is Too Slow for Production Use
- 30:49Standard Optional
- 34:51Diff View
- 44:30Standard Move Moves
- 50:47Always Pass Input Arguments by Const Reference
- 57:09Myth 37 Make all Data Members Private
- 1:07:35Iterators and Ranges
- 1:14:01Do You Think Lifetime Annotations or a Borrower Checker Could Be Introduced into C plus plus on a Realistic Time Scale
related talks
50mPlenary: C++ MythBusters
01h 08mC++ MythBusters Strike 2
57mC++ MythBusters Strike 2
01h 01m“A modern formatting library for C++”
51mTypical C++, but Why?
01h 00mMoving Faster: Everyday efficiency in modern C++
01h 30mTuning C++: Benchmarks, and CPUs, and Compilers! Oh My!
59mSoftware Engineering Is About Tradeoffs
