Script Preparation code:
Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
Using the spread operator
5.2M/s
Using Object.assign
4.0M/s
Babel
705K/s

Fastest: Using the spread operator (7.3x faster)

View exact numbers
  • Using the spread operator: 5,174,888 ops/sec
  • Using Object.assign: 3,971,187 ops/sec
  • Babel: 704,698 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
    Babel

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:131.0) Gecko/20100101 Firefox/131.0
Firefox 131 on Windows
View result in a separate tab
Using Object.assign
28.6M/s
Using the spread operator
17.2M/s
Babel
2.8M/s
View exact numbers
Test name Executions per second
Using Object.assign 28,609,574 Ops/sec
Using the spread operator 17,217,832 Ops/sec
Babel 2,821,409 Ops/sec