Tests:

Historical Performance Data aggregated from 18 community runs

Desktop Results:
Chrome 18 runs
Using the spread operator
21.6M/s
Using Object.assign
5.9M/s

Fastest: Using the spread operator (3.7x faster)

View exact numbers
  • Using the spread operator: 21,611,484 ops/sec
  • Using Object.assign: 5,866,378 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: 9 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0
Firefox 144 on Windows
View result in a separate tab
Using Object.assign
26.2M/s
Using the spread operator
18.1M/s
View exact numbers
Test name Executions per second
Using Object.assign 26,247,028 Ops/sec
Using the spread operator 18,068,720 Ops/sec