Tests:
  • Object.assign

  • Object spread

  • Object Indexed Add

  • Object Dot Add

  • Array.prototype.concat

  • Array.prototype.push (grouped)

  • Array.prototype.push (single)

  • Array Spread

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Object.assign
    Object spread
    Object Indexed Add
    Object Dot Add
    Array.prototype.concat
    Array.prototype.push (grouped)
    Array.prototype.push (single)
    Array Spread

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Chrome 89 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
Object.assign 5172089.0 Ops/sec
Object spread 14043080.0 Ops/sec
Object Indexed Add 931925800.0 Ops/sec
Object Dot Add 916661000.0 Ops/sec
Array.prototype.concat 3414842.0 Ops/sec
Array.prototype.push (grouped) 49943960.0 Ops/sec
Array.prototype.push (single) 50199010.0 Ops/sec
Array Spread 38363780.0 Ops/sec