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
Destructuring and Restructuring
16.0M/s
JSON stringify and parse
1.2M/s
structuredClone
693K/s
View exact numbers
Test name
Executions per second
✓
Destructuring and Restructuring
15,998,959 Ops/sec
JSON stringify and parse
1,155,466 Ops/sec
structuredClone
692,880 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 };