Tests:

Historical Performance Data aggregated from 13 community runs

Desktop Results:
Chrome 8 runs
Using the spread operator
39.2M/s
Using Object.assign
29.6M/s

Fastest: Using the spread operator (1.3x faster)

View exact numbers
  • Using the spread operator: 39,223,236 ops/sec
  • Using Object.assign: 29,553,288 ops/sec
Firefox 5 runs
Using Object.assign
26.8M/s
Using the spread operator
16.8M/s

Fastest: Using Object.assign (1.6x faster)

View exact numbers
  • Using Object.assign: 26,826,592 ops/sec
  • Using the spread operator: 16,823,466 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Using the spread operator
    Using Object.assign

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0
Firefox 147 on Mac OS X 10.15
View result in a separate tab
Using Object.assign
16.4M/s
Using the spread operator
10.6M/s
View exact numbers
Test name Executions per second
Using Object.assign 16,366,805 Ops/sec
Using the spread operator 10,608,447 Ops/sec