Tests:
  • Array.prototype.concat

    AخA
     
    var arr = [1, 2, 3, 4, 5]
    var other = arr.concat(3);
  • spread operator

     
    var arr = [1, 2, 3, 4, 5]
    var other = [ ...arr, 3 ]
  • Push

     
    var arr = [1, 2, 3, 4, 5]
    var other = arr.push(3);
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: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Chrome 81 on Mac OS X 10.15.4
View result in a separate tab
Test name Executions per second
Array.prototype.concat 4437041.0 Ops/sec
spread operator 30229826.0 Ops/sec
Push 47660772.0 Ops/sec