Tests:

Historical Performance Data aggregated from 33 community runs

Desktop Results:
Chrome 27 runs
Create new object while copying
168.1M/s
Manually copying properties
167.3M/s
Create new object from scratch
161.1M/s
Using the spread operator
45.5M/s
Using Object.assign
7.6M/s

Fastest: Create new object while copying (22.2x faster)

View exact numbers
  • Create new object while copying: 168,059,488 ops/sec
  • Manually copying properties: 167,285,760 ops/sec
  • Create new object from scratch: 161,117,184 ops/sec
  • Using the spread operator: 45,533,972 ops/sec
  • Using Object.assign: 7,570,570 ops/sec
Mobile Results:
Chrome 6 runs
Create new object from scratch
278.2M/s
Manually copying properties
185.5M/s
Create new object while copying
180.7M/s
Using the spread operator
34.8M/s
Using Object.assign
6.8M/s

Fastest: Create new object from scratch (41.2x faster)

View exact numbers
  • Create new object from scratch: 278,225,696 ops/sec
  • Manually copying properties: 185,548,656 ops/sec
  • Create new object while copying: 180,721,968 ops/sec
  • Using the spread operator: 34,826,072 ops/sec
  • Using Object.assign: 6,760,750 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
    Manually copying properties
    Create new object while copying
    Create new object from scratch

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Mobile Safari/537.36
Chrome Mobile 136 on Android
View result in a separate tab
Manually copying properties
132.4M/s
Create new object from scratch
130.6M/s
Create new object while copying
127.3M/s
Using the spread operator
43.8M/s
Using Object.assign
10.6M/s
View exact numbers
Test name Executions per second
Manually copying properties 132,414,600 Ops/sec
Create new object from scratch 130,561,976 Ops/sec
Create new object while copying 127,349,336 Ops/sec
Using the spread operator 43,787,276 Ops/sec
Using Object.assign 10,636,184 Ops/sec