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 a = [];
for (var i = 0; i < 2000; i++) {
a[i] = i;
}
</script>
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spread = (this && this.__spread) || function () {
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
return ar;
};
Ready to run.
Test | Ops/sec | |
---|---|---|
Typescript downleveliteration |
| ready |
Spread operator |
| ready |
Array from |
| ready |
Concat |
| ready |
Slice |
| ready |
Map arrow function |
| ready |
Slice with 0 index |
| ready |
Concat 2 |
| ready |
Map |
| ready |
Slice with 0 index and length |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.