Run Fast! Catch Performance Regressions in Python
summary
A calendar API adds a simple fizz/buzz/fizzbuzz feature and then a naive Fibonacci check that pushes endpoint cost from ~0.1s to much higher at scale; local microbenchmarks using pytest-benchmark show the slow naive algorithm, applying memoization drops runtime roughly sixfold, and committing benchmarks to CI with the Bencher CLI records results and raises alerts when a new commit exceeds configured thresholds so regressions get caught before production.
AI-written summary Β· about
chapters (8)
- 0:00Performance regression detection
- 1:47FizzBuzz Fibonacci disaster
- 5:40Naive Fibonacci benchmarking
- 8:31Memoization for performance
- 9:54Micro vs macro benchmarks
- 12:22Local benchmarking limits
- 13:02Continuous benchmarking with Bencher
- 16:55Why continuous benchmarking
related talks
30mIntuition vs. Reality: Surprising Truths in Python Performance
42mMeasuring Performance with Functional Tests: A Low-Effort Approach for High Impact
31mMaking it Fast: The Power of Benchmarking
02h 44mMeasure, donβt guess: benchmarking stories from the trenches
34mKilling Fibonacci
46mStop Guessing and Start Measuring - Benchmarking in Practice
01h 31mDebugging and profiling techniques
26mExploring FHIR Performance Benchmarking
