Test name | Executions per second |
---|---|
concat | 596.8 Ops/sec |
push | 38310.3 Ops/sec |
var someBigArray = [];
var anotherArray = [];
for (var i = 0; i < 100; i++) {
someBigArray.push(10);
anotherArray.push(10);
}
someBigArray = someBigArray.concat(anotherArray);
anotherArray.forEach(function(item) {
someBigArray.push(anotherArray);
})