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
<div>
<ul>
<li><a href="#">item 1</a></li>
<li><a href="#">item 2</a></li>
<li><a href="#">item 3</a></li>
</ul>
</div>
<script>
var liveList = function() {
return document.getElementsByTagName('a');
},
statList = function() {
return document.querySelectorAll('a');
},
liveArr = function() {
return Array.prototype.slice.apply(liveList());
},
statArr = function() {
return Array.prototype.slice.apply(statList());
};
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
Live List (while) |
| ready |
Static List (while) |
| ready |
Array of Live List (while) |
| ready |
Array of Static List (while) |
| ready |
Live List (for) |
| ready |
Static List (for) |
| ready |
Array of Live List (for) |
| ready |
Array of Static List (for) |
| ready |
Live List (while) (--i) |
| ready |
Static List (while) (--i) |
| ready |
Array of Live List (while) (--i) |
| ready |
Array of Static List (while) (--i) |
| ready |
Live List (for) (++i) |
| ready |
Static List (for) (++i) |
| ready |
Array of Live List (for) (++i) |
| ready |
Array of Static List (for) (++i) |
| ready |
Refined Live (for)1 |
| ready |
Refined Live (for)2 |
| ready |
Refined Live (for)3 |
| ready |
Live (while!!)1 |
| ready |
Live (while!!)2 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.