Script Preparation code:
x
 
var first = ['1', '2', '3'];
var second = ['4', '5', '6'];
Tests:
  • Spread

     
    first = [...first, ...second]
  • Push spread

     
    first.push(...second)
  • Concat

     
    first.concat(second)
  • Push apply

     
    first.push.apply(first, second)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Spread
    Push spread
    Concat
    Push apply

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.56 Safari/537.36 Edg/83.0.478.33
Chrome 83 on Windows
View result in a separate tab
Test name Executions per second
Spread 3038.4 Ops/sec
Push spread 2802550.8 Ops/sec
Concat 5.3 Ops/sec
Push apply 2306947.5 Ops/sec