Tests:

Historical Performance Data aggregated from 6 community runs

Desktop Results:
Chrome 6 runs
Using the spread operator
35.9M/s
Using Object.assign
12.8M/s
Not merging
6.7M/s

Fastest: Using the spread operator (5.3x faster)

View exact numbers
  • Using the spread operator: 35,875,352 ops/sec
  • Using Object.assign: 12,840,629 ops/sec
  • Not merging: 6,709,864 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
    Not merging

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15
Safari 18 on Mac OS X 10.15.7
View result in a separate tab
Not merging
13.1M/s
Using Object.assign
12.4M/s
Using the spread operator
9.5M/s
View exact numbers
Test name Executions per second
Not merging 13,097,471 Ops/sec
Using Object.assign 12,372,391 Ops/sec
Using the spread operator 9,493,565 Ops/sec