~/talk

Using jsPerf correctly

Talkat JSConf EU 2011 · 2011-10-01..10-02· [web-performance, javascript]
slides:none on file

jsPerf shows about 68% broken tests and adds roughly 57 new test cases per day, so expect noise not answers. Benchmarks rely on Benchmark.js and BrowserScope for timing and storage; common failures are declaring functions inside the timed body, leaking or not resetting globals, using randomness, testing async code synchronously, and not testing all target engines. Good tests put helpers in preparation/setup/teardown, use Benchmark.js advanced APIs, avoid randomness, and account for plugins and timer granularity.

AI-written summary · about

  1. 0:00Intro
  2. 2:39Statistics
  3. 3:45Benchmarking pitfalls
  4. 5:53Test in all browsers
  5. 6:14The 6 bullet points
  6. 6:51Common problems with tests
  7. 8:02Running tests
  8. 8:53Comparing methods
  9. 9:56Test case example
  10. 11:14Reset variables
  11. 12:25Test rerun
  12. 12:52Test randomness
  13. 13:29Never just asynchronous
  14. 14:29synchronous tests
  15. 16:48multi test case
  16. 17:54dumb cleanup
  17. 19:59benchmarkjs
  18. 20:26testcount
  19. 21:21unexpected browser features
~/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.