Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
Using the spread operator
27.0M/s
Using Object.assign into empty object
9.0M/s

Fastest: Using the spread operator (3.0x faster)

View exact numbers
  • Using the spread operator: 26,995,036 ops/sec
  • Using Object.assign into empty object: 8,964,579 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 into empty object

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Chrome 128 on Mac OS X 10.15.7
View result in a separate tab
Using the spread operator
20.8M/s
Using Object.assign into empty object
8.4M/s
View exact numbers
Test name Executions per second
Using the spread operator 20,791,154 Ops/sec
Using Object.assign into empty object 8,445,812 Ops/sec