Tests:

Historical Performance Data aggregated from 12 community runs

Desktop Results:
Chrome 12 runs
Create new object from scratch
162.9M/s
Create new object while copying
159.1M/s
Manually copying properties
146.9M/s
Using the spread operator
49.0M/s
Using Object.assign
12.9M/s
JSON
3.1M/s
StructuredClone
808K/s

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

View exact numbers
  • Create new object from scratch: 162,857,216 ops/sec
  • Create new object while copying: 159,094,688 ops/sec
  • Manually copying properties: 146,901,056 ops/sec
  • Using the spread operator: 49,019,032 ops/sec
  • Using Object.assign: 12,917,174 ops/sec
  • JSON: 3,130,641 ops/sec
  • StructuredClone: 807,705 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
    StructuredClone
    JSON

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Mobile Safari/537.36 OPR/95.0.0.0
Opera Mobile 95 on Android
View result in a separate tab
Create new object from scratch
127.2M/s
Manually copying properties
119.9M/s
Create new object while copying
119.5M/s
Using the spread operator
40.5M/s
Using Object.assign
10.6M/s
JSON
2.2M/s
StructuredClone
332K/s
View exact numbers
Test name Executions per second
Create new object from scratch 127,190,776 Ops/sec
Manually copying properties 119,866,712 Ops/sec
Create new object while copying 119,516,416 Ops/sec
Using the spread operator 40,543,332 Ops/sec
Using Object.assign 10,563,756 Ops/sec
JSON 2,229,924 Ops/sec
StructuredClone 331,637 Ops/sec