Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JSON Parse vs StructuredClone bigger object
Comparses JSON.parse(JSON.stringify()) vs structuredClone on a bigger JSON object
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0
Browser:
Firefox 144
Operating system:
Linux
Device Platform:
Desktop
Date tested:
6 months ago
Test name
Executions per second
strucutredClone
217106.8 Ops/sec
JSON.parse(JSON.stringify())
183211.4 Ops/sec
Script Preparation code:
var object = { type: "FeatureCollection", features: [{ type: "Feature", properties: {}, geometry: { type: "Point", coordinates: [4.483605784808901, 51.907188449679325] } }, { "type": "Feature", "properties": {}, "geometry": { "type": "Polygon", "coordinates": [ [ [3.974369110811523, 51.907355547778565], [4.173944459020191, 51.86237166892457], [4.3808076710679416, 51.848867725914914], [4.579822414365026, 51.874487141880024], [4.534413416598767, 51.9495302480326], [4.365110733567974, 51.92360787140825], [4.179550508127079, 51.97336560819281], [4.018096293847009, 52.00236546429852], [3.9424146309028174, 51.97681895676649], [3.974369110811523, 51.907355547778565] ] ] } } ] }; var copy = null;
Tests:
strucutredClone
copy = structuredClone(object);
JSON.parse(JSON.stringify())
copy = JSON.parse(JSON.stringify(object));