Test name | Executions per second |
---|---|
Array.prototype.concat | 5808181.0 Ops/sec |
spread operator | 5720400.0 Ops/sec |
var first = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
var second = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
var other = first.concat(second);
var first = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
var second = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
var other = [ first, second ]