This command line utility helps you run performance tests from http://jsperf.com locally with NodeJS.
npm install jsperf -g
The tool runs the code fetched from jsperf.com w/o any processing. This can be very dangerous. Review the tests before running or use disposable sandboxes
This also means that browser-dependant tests will not run (at least with the current version). Fetch only pure JS tests.
Create a folder for your local tests:
mkdir my-jsperf-tests
Initialize your tests:
cd my-jsperf-tests
jsperf init
Get a test:
jsperf get <test-slug> <revision>
For instance:
jsperf get replace-vs-split-join-vs-replaceall 67
Preview a test:
jsperf preview replace-vs-split-join-vs-replaceall 67
Run a test:
jsperf run replace-vs-split-join-vs-replaceall 67
Results: