Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash cloneDeep vs structuredClone vs JSON.stringify/parse 2
https://developer.mozilla.org/en-US/docs/Web/API/structuredClone
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser:
Chrome 143
Operating system:
Windows
Device Platform:
Desktop
Date tested:
4 months ago
Test name
Executions per second
Lodash cloneDeep
26430.2 Ops/sec
Native structuredClone
54009.5 Ops/sec
JSON.stringify / parse
64495.6 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
const data = { id: crypto.randomUUID(), timestamp: new Date(), nested: { numbers: Array.from({ length: 1000 }, (_, i) => i), text: "Some sample text content ".repeat(10), tags: new Set(['performance', 'benchmark', '2025']), mapping: new Map([['key1', 'val1'], ['key2', 'val2']]) } };
Tests:
Lodash cloneDeep
_.cloneDeep(data);
Native structuredClone
structuredClone(data);
JSON.stringify / parse
myCopy = JSON.parse(JSON.stringify(data));