Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
structuredClone vs spread vs json stringify & parse
(version: 0)
Comparing performance of:
structuredClone() vs spread syntax vs parse(stringify())
Created:
2 years ago
by:
Guest
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:
structuredClone()
const newObj = structuredClone(voucher)
spread syntax
const newObj = {...voucher}
parse(stringify())
const newObj = JSON.parse(JSON.stringify(voucher))
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
structuredClone()
spread syntax
parse(stringify())
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?