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
<script>
var arr1 = [2, 3, 4, 5];
var arr2 = [4, 3, 3, 1];
var res = 0;
function sumPop(array1, array2) {
if (array1.length) return array1.pop() * array2.pop() + sumPop(array1, array2);
return 0;
}
function sumI(array1, array2, i, len, undefined) {
if (i === len) return 0; else return array1[i] * array2[i] + sumI(array1, array2, ++i, len);
}
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
pop |
| ready |
i |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.