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
Filter: <span id="filter"></span>
Loop: <span id="loop"></span>
<script>
var i = 1000;
var data = new Array(i);
for (;i--;) {
data[i] = Math.ceil(Math.random()*1000);
}
var out;
function loopFunc (el) {
var i = 0,
j = el.length,
res = [];
for (;i !== j; i++) {
if (el[i] > 500) res.push(el[i])
}
return res;
};
var elFilter = document.getElementById('filter');
var elLoop = document.getElementById('loop');
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
filter |
| ready |
loop |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.