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
a = [1,2,3,4,5,6,7,8,9,10];
b = a.slice().reverse();
function A(
[a0, a1, a2, a3, a4, a5, a6, a7, a8, a9],
[b0, b1, b2, b3, b4, b5, b6, b7, b8, b9]
) {
return [a0 + b0, a1 + b1, a2 + b2, a3 + b3, a4 + b4, a5 + b5, a6 + b6, a7 + b7, a8 + b8, a9 + b9];
}
function B(
a0,
b0
) {
return [a0[0] + b0[0], a0[1] + b0[1], a0[2] + b0[2], a0[3] + b0[3], a0[4] + b0[4], a0[5] + b0[5], a0[6] + b0[6], a0[7] + b0[7], a0[8] + b0[8], a0[9] + b0[9]];
}
Ready to run.
Test | Ops/sec | |
---|---|---|
Array destructuring parameter |
| ready |
Array access |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.