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>
Array.prototype.every = function (fn) {
var arr = [], len = this.length, i, t;
for (i = 0; i < len; i += 1) {
t = this[i];
arr.push(fn.call(t, t, i, this));
}
return arr;
};
Array.prototype.accumulate = function (fn) {
var len = this.length, i, curr = 0, t;
for (i = 0; i < len; i += 1) {
t = this[i];
curr = fn.call(t, curr, t, i, this);
}
return curr;
};
function square(n) {
return n * n;
}
function sum(a, b) {
return a + b;
}
var list = [1, 2, 3, 4, 5];
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
d1 |
| ready |
i1 |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.