Tests:
  • Array.prototype.concat

    x
     
    const first = [ 1, 2, 3 ]
    const second = [ 4, 5, 6 ]
    return first.concat(second);
  • spread operator

     
    var first = [ 1, 2, 3 ]
    var second = [ 4, 5, 6 ]
    return [...first, ...second];
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.concat
    spread operator

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Chrome 118 on Linux
View result in a separate tab
Test name Executions per second
Array.prototype.concat 18864880.0 Ops/sec
spread operator 70866304.0 Ops/sec