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
<p id="foo">Foo</p>
<p id="bar">Bar</p>
<p id="baz">Baz</p>
<p class="test">Baz</p>
<p class="test">Baz</p>
<p class="test">Baz</p>
<p class="test">Baz</p>
var select = function(name)
{
var o = name.charAt(0);
if (o == '#') return document.getElementById(name.substr(1, name.length -1));
else if (o == '.') return document.getElementsByClassName(name.substr(1, name.length -1));
else return document.getElementsByTagName(name);
};
Ready to run.
Test | Ops/sec | |
---|---|---|
getElementById |
| ready |
querySelector |
| ready |
mapping to getElementById |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.