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 = params.push(...[1, 2]);
  • apply proto

     
    var params = [ "hello", true, 7 ];
    Array.prototype.push.apply(params, [1, 2]);
  • params.push

     
    var params = [ "hello", true, 7 ];
    var other = params.push.apply(params, [1, 2]);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.concat
    spread operator
    apply proto
    params.push

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36
Chrome 109 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Array.prototype.concat 17030786.0 Ops/sec
spread operator 68333856.0 Ops/sec
apply proto 9461015.0 Ops/sec
params.push 67424496.0 Ops/sec