Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
spread vs create object
(version: 1)
Comparing performance of:
spread syntax vs create
Created:
one year ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var voucher = { "single": false, "applyOverTaxes": false, "discountType": "1", "value": 100, "minimumAmount": 0, "quantity": 1, "suffixLength": 8, "code": "IF5R0AFX", "vertical": true, "allowedPaymentMethods": null, "allowedBanks": null, "types": undefined, "partners": "Many", "startDate": "2020-10-21T00:00:00.000Z", "endDate": "2020-10-21T00:00:00.000Z", "applyed": false }
Tests:
spread syntax
var newObj = {...voucher}
create
var newObj = { "single": false, "applyOverTaxes": false, "discountType": "1", "value": 100, "minimumAmount": 0, "quantity": 1, "suffixLength": 8, "code": "IF5R0AFX", "vertical": true, "allowedPaymentMethods": null, "allowedBanks": null, "types": undefined, "partners": "Many", "startDate": "2020-10-21T00:00:00.000Z", "endDate": "2020-10-21T00:00:00.000Z", "applyed": false }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
spread syntax
create
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser/OS:
Chrome 130 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
spread syntax
8185314.0 Ops/sec
create
10085079.0 Ops/sec
Related benchmarks:
cloneDeep vs spread object
structuredClone vs spread object
structuredClone vs spread
structuredClone vs spread vs Object.assign()
structuredClone vs spread object comparison
structuredClone vs spread syntax
structuredClone vs spread object 2
structuredClone vs spread vs Object.assign syntax
object copy bench
Comments
Confirm delete:
Do you really want to delete benchmark?