Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
Chrome 83
Mac OS X 10.14.0
Desktop
4 years ago
Test name Executions per second
Array.prototype.concat 3492112.0 Ops/sec
spread operator 9103807.0 Ops/sec
Push 10183962.0 Ops/sec
Tests:
  • Array.prototype.concat

    AخA
     
    var params = [ "hello", true, 7 ];
    var other = [ 1, 2 ].concat(params);
  • spread operator

     
    var params = [ "hello", true, 7 ]
    var other = [ 1, 2, ...params ]
  • Push

     
    var params = [ "hello", true, 7 ];
    var other = [ 1, 2 ].push(...params);