~/talk

Practical guide to benchmarking your optimizations

Talkat RubyConf 2018 · 2018-11-28..11-30· [web-performance, ruby]
links:none on file
slides:none on file

Argues that slowness usually comes from unbenchmarked design choices and shows concrete fixes: use Ruby’s Benchmark module (BMBM) with a rehearsal run, instrument with simple start_time checks, and pick representative data via stratified/cluster/systematic sampling; sample sizes around 100–500 (the statistical rule 384.5 gives ~95% confidence). Demonstrated a cat‑shelter estimator where a recursive black‑cat branch is the bottleneck, and a triangle‑sum problem replaced nested construction with a direct formula yielding orders‑of‑magnitude speedup.

AI-written summary · about

  1. 0:00Intro
  2. 1:08Myth
  3. 1:57Why should you worry about performance?
  4. 2:42Moral of the story
  5. 4:51Let's dive into code!
  6. 6:32How fast is this code?
  7. 6:49Benchmarking
  8. 8:10Different types of samples
  9. 8:27Simple Random Sample
  10. 9:09Stratified Sample
  11. 10:29Cluster Sampling
  12. 11:12Systematic Random Sampling
  13. 11:43Multi-stage
  14. 12:16What should you use?
  15. 13:36Variables to consider
  16. 15:07Benchmark explained
  17. 16:58Example
  18. 19:10Things to watch out for
  19. 20:35What made black cats slower?
  20. 21:59Rethink the problem
  21. 23:35My solution...
  22. 24:20Better solution
  23. 25:01Performance difference?
  24. 25:23Find bottlenecks
  25. 27:23When should you benchmark changes?
  26. 28:41Go forth and benchmark!
~/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.