Benchmarking Like a Boss
summary
Benchmarking claims practical fixes: a rewrite yields benchmark.js powering jsperf.com and a passive monitor called x-stats js that measures FPS and memory. Timing strategy changes from fixed loops to short adaptive runs — typically 50 milliseconds on modern browsers versus ~750ms or 1s for low-resolution timers — and a Java-backed nanosecond-ish timer reduces IE timer problems. Results use ops/sec, sample sizes ~100, margins of error and t-tests with a 5% wiggle to avoid false significance; beware dead-code removal and caching.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 1:22Synthetic Benchmarks
- 2:01DOM Benchmarks
- 2:44JSperf
- 3:02JScom
- 3:37XstatsJS
- 4:35While Loop
- 5:33One Second Test
- 7:41Context
- 8:39Consistency
- 9:28Results
- 10:01Firefox Bug
- 11:00Finding Accurate Formulas
- 12:13How to Get Consistent Timer Resolution
- 13:31Formulas
- 14:19Ttest
- 15:06Khan Academy
- 15:33Gotchas
- 16:19Issues
- 17:48Questions
related talks
38mYour benchmark may not guide a real application performance
02h 44mMeasure, don’t guess: benchmarking stories from the trenches
39mMicro Benchmarks
02h 41mMicro Benchmarking - The Art of Realizing One is Wrong
01h 11mMeasuring Performance, JavaScript Games, and Distributed Testing
35mBenchmarking: You're Doing It Wrong
49mPerformance Testing
46mStop Guessing and Start Measuring - Benchmarking in Practice
