jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
This test was spawned by some discussion in a StackOverflow thread:
http://stackoverflow.com/questions/9833312/how-do-i-properly-store-a-javascript-template-so-that-it-isnt-instantiated-mul
The purpose is to test the speed of rendering an underscore.js template when selecting the template from the DOM every time, vs selecting it once and re-rendering the cached template every time.
this.cachedItem = $("#test-template");
this.cachedTemplate = _.template(this.cachedItem.html());
this.output = $("#html-output-goes-here");
delete this.cachedItem;
delete this.cachedTemplate;
Ready to run.
Test | Ops/sec | |
---|---|---|
Cached |
| ready |
Non-Cached |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.