Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Deep clone performance comparison
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0
Browser:
Firefox 127
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
JSON stringify and parse
1155466.2 Ops/sec
structuredClone
692880.2 Ops/sec
Destructuring and Restructuring
15998959.0 Ops/sec
Script Preparation code:
var obj = {a: "hello", c: "test", po: 33, arr: [1, 2, 3, 4], anotherObj: {a: 33, str: "whazzup"}};
Tests:
JSON stringify and parse
const obj1 = JSON.parse(JSON.stringify(obj));
structuredClone
const obj2 = structuredClone(obj);
Destructuring and Restructuring
const obj3 = { ...obj };