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
Compare the speed of the multitude of ways to select a node in JavaScript.
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div><div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div id="find-me">
<div class="find-me"/>
<div class="find-me"/>
<div class="find-me"/>
</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
<div>Padding for a more fair reflection of selection work being done</div>
Ready to run.
Test | Ops/sec | |
---|---|---|
getElementById |
| ready |
getElementsByClassName |
| ready |
querySelector(id) |
| ready |
querySelector(class) |
| ready |
querySelector(tag#id) |
| ready |
querySelector(tag.class) |
| ready |
getElementsByTagName |
| ready |
querySelector(#id .class) |
| ready |
getElementById(id).getElementsByClassName(class) |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.