Asserting Your Way to Faster Programs
summary
Empirical results on Bloomberg’s BDE libraries compare assume vs ignore semantics using clang 12.0.1 on x86: compile time and compiler memory use show no measurable change within a 95% confidence interval, overall binaries shrink, many functions get smaller while a few grow (loop unrolling), and runtime rarely worsens — most tests show no degradation and one microbenchmark (swap overload) gains measurable speed. The change is a compiler-optimization signal rather than extra developer work.
AI-written summary · about
chapters (35)
- 0:00Intro
- 0:35Welcome
- 0:50About me
- 2:17What I found
- 2:58Outline
- 10:28Recap
- 11:00Precondition check
- 12:04Ignore Semantic
- 12:57Assume Semantic
- 13:31Assume Contract Violation
- 14:13Contract Preconditions
- 16:18Example
- 18:20Assumptions
- 18:35Contracts
- 20:01Implementation
- 21:28Method
- 22:46Case Study
- 23:18Experiments
- 24:36Conclusion
- 24:48Interesting Fact 1
- 26:06Interesting Fact 2
- 27:45Contract Checking in BD
- 28:05How does BD assert sort work
- 28:24Ignore precondition checks
- 28:35Ignore contracts
- 28:46P2064
- 29:06Experimentation
- 29:27Contract Checking
- 29:54How many assertions are present
- 30:58Whats in the assertions
- 33:16Performance
- 34:40Turning off checks
- 35:15Review
- 35:49Whats left
- 36:44The takeaways
related talks
58mOptimization Tips - Mo' Hustle Mo' Problems
01h 02mFastware
01h 00mMoving Faster: Everyday efficiency in modern C++
37mC++ as an Optimizing Assembler - a Performance Talk
01h 04mDeveloping the Bloomberg Terminal -- Local performance & measurement techniques
50mMy program was running fast 6 month ago. What happend?
01h 03mC++ Function Multiversioning in Windows
01h 05mFast and small C++ - When efficiency matters
