Run details:
Mozilla/5.0 (Linux; Android 10; SM-N960N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.86 Mobile Safari/537.36
Chrome Mobile 87
Android
Mobile
4 years ago
Test name Executions per second
Array.prototype.concat 2595985.2 Ops/sec
spread operator 10515480.0 Ops/sec
Push 6580420.5 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);