Object assign vs spread operator vs manual assign (version: 0)
Testing how these fare against each other to create a new object (no nested objects). The tests will also change one of the properties in the new object.
Comparing performance of: Object assign vs Spread operator vs Manually
Memory measurements supported only in Chrome.
For precise memory measurements Chrome must be launched with --enable-precise-memory-info flag.
More information: Monitoring JavaScript Memory
Test case name
Result
Object assign
Spread operator
Manually
Fastest:N/A
Slowest:N/A
Latest run results:
Run details: (Test run date:
2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0