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
const simpleSum = (count) => {
let sum = 0;
for(let i=0; i < count; i += 1) {
sum += i + 1;
}
return sum;
}
const parallelSum = (count) => {
let sum1 = 0;
let sum2 = 0;
for(let i=0; i < count; i += 2) {
sum1 += i + 1;
sum2 += i + 2;
}
return sum1 + sum2 - (count % 2 ? (count + 1) : 0);
};
Ready to run.
Test | Ops/sec | |
---|---|---|
Unrolled |
| ready |
Regular |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.