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
function current(a, b) {
var idx = 0;
var ilen = a.length;
var j;
var jlen = b.length;
var result = [];
while (idx < ilen) {
j = 0;
while (j < jlen) {
result[result.length] = [a[idx], b[j]];
j += 1;
}
idx += 1;
}
return result;
}
function next(a, b) {
var idx = 0;
var ilen = a.length;
var j;
var jlen = b.length;
var result = Array(ilen + jlen);
while (idx < ilen) {
j = 0;
while (j < jlen) {
result[idx + j] = [a[idx], b[j]];
j += 1;
}
idx += 1;
}
return result;
}
const arr1 = Array(1000).fill(undefined).map((_, i) => i);
const arr2 = Array(1000).fill(undefined).map((_, i) => i);
Ready to run.
Test | Ops/sec | |
---|---|---|
Current |
| ready |
Next |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.