Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Using jsPerf Correctly

JSConf via YouTube

Overview

Discover how to effectively use jsPerf for JavaScript performance testing in this JSConf EU 2011 talk. Learn about benchmarking pitfalls, the importance of testing across multiple browsers, and six key points for accurate results. Explore common problems with tests, proper test case setup, variable resetting, and handling asynchronous operations. Gain insights into comparing methods, dealing with test randomness, and avoiding unexpected browser features that can skew results. Master the art of creating reliable JavaScript benchmarks to optimize your code performance.

Syllabus

Intro
Statistics
Benchmarking pitfalls
Test in all browsers
The 6 bullet points
Common problems with tests
Running tests
Comparing methods
Test case example
Reset variables
Test case
Test rerun
Test randomness
Never just asynchronous
synchronous tests
multi test case
dumb cleanup
benchmarkjs
testcount
unexpected browser features

Taught by

JSConf

Reviews

Start your review of Using jsPerf Correctly

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.