Tests:
  • Array.prototype.concat

    AخA
     
    var params = [ "hello", true, 7 ];
    var other = [ 1, 2,3,4,5,6,7,8,9,10,11,23,23,23,23,23,23,23,23,12,12,22,234,232,23,23,232,23,2321,131,21 ]
    var concat = other.concat(params);
  • spread operator

     
    var params = [ "hello", true, 7 ]
    var other = [  1, 2,3,4,5,6,7,8,9,10,11,23,23,23,23,23,23,23,23,12,12,22,234,232,23,23,232,23,2321,131,21 ];
    var some = [...other, ...params]
  • Push

     
    var params = [ "hello", true, 7 ];
    var other = [  1, 2,3,4,5,6,7,8,9,10,11,23,23,23,23,23,23,23,23,12,12,22,234,232,23,23,232,23,2321,131,21 ];
    other.push(...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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0
Firefox 93 on Linux
View result in a separate tab
Test name Executions per second
Array.prototype.concat 2002007.2 Ops/sec
spread operator 1551940.1 Ops/sec
Push 4284410.5 Ops/sec