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);
  • Object assign

     
    var params = [ "hello", true, 7 ];
    var other = Object.assign([], params);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.concat
    spread operator
    Push
    Object assign

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0
Firefox 133 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Array.prototype.concat 17773072.0 Ops/sec
spread operator 21564862.0 Ops/sec
Push 26631212.0 Ops/sec
Object assign 5186868.5 Ops/sec