Test name | Executions per second |
---|---|
Spread | 51575.7 Ops/sec |
Concat | 300218.8 Ops/sec |
Concat from empty | 225175.7 Ops/sec |
var a = Array.from({ length: 2000 }, (_, index) => index);
var b = Array.from({ length: 2000 }, (_, index) => 2000 - index);
const spread = [a, b];
const concat = a.concat(b);
const concatEmpty = [].concat(a).concat(b);