Tests:

Historical Performance Data aggregated from 856 community runs

Desktop Results:
Chrome 659 runs
Using the spread operator
34.1M/s
Using Object.assign
13.1M/s

Fastest: Using the spread operator (2.6x faster)

View exact numbers
  • Using the spread operator: 34,057,664 ops/sec
  • Using Object.assign: 13,059,139 ops/sec
Firefox 106 runs
Using Object.assign
27.3M/s
Using the spread operator
13.8M/s

Fastest: Using Object.assign (2.0x faster)

View exact numbers
  • Using Object.assign: 27,264,986 ops/sec
  • Using the spread operator: 13,827,054 ops/sec
Safari 25 runs
Using the spread operator
16.9M/s
Using Object.assign
12.7M/s

Fastest: Using the spread operator (1.3x faster)

View exact numbers
  • Using the spread operator: 16,926,222 ops/sec
  • Using Object.assign: 12,740,767 ops/sec
Other 16 runs
Using the spread operator
24.8M/s
Using Object.assign
8.2M/s

Fastest: Using the spread operator (3.0x faster)

View exact numbers
  • Using the spread operator: 24,788,604 ops/sec
  • Using Object.assign: 8,219,880 ops/sec
Mobile Results:
Chrome 31 runs
Using the spread operator
16.7M/s
Using Object.assign
6.8M/s

Fastest: Using the spread operator (2.4x faster)

View exact numbers
  • Using the spread operator: 16,650,817 ops/sec
  • Using Object.assign: 6,834,563 ops/sec
Safari 19 runs
Using the spread operator
15.2M/s
Using Object.assign
13.3M/s

Fastest: Using the spread operator (1.2x faster)

View exact numbers
  • Using the spread operator: 15,238,333 ops/sec
  • Using Object.assign: 13,250,666 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: one month ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:152.0) Gecko/20100101 Firefox/152.0
Firefox 152 on Mac OS X 10.15
View result in a separate tab
Using Object.assign
51.8M/s
Using the spread operator
26.2M/s
View exact numbers
Test name Executions per second
Using Object.assign 51,817,564 Ops/sec
Using the spread operator 26,183,906 Ops/sec