Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
structuredClone test boop
(version: 1)
compare array copy/clone methods sdfewfe
Comparing performance of:
Lodash cloneDeep vs structuredClone vs factory function
Created:
7 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var testArray = [{ description: 'Random description.', testNumber: 123456789, testBoolean: true, testObject: { testString: 'test string', testNumber: 12345 }, testArray: [{ myName: 'test name', myNumber: 123245 }] },{ description: 'Random description.', testNumber: 123456789, testBoolean: true, testObject: { testString: 'test string', testNumber: 12345 }, testArray: [{ myName: 'test name', myNumber: 123245 }] }]; var testCopy = null; var factory = function() { return [{ description: 'Random description.', testNumber: 123456789, testBoolean: true, testObject: { testString: 'test string', testNumber: 12345 }, testArray: [{ myName: 'test name', myNumber: 123245 }] },{ description: 'Random description.', testNumber: 123456789, testBoolean: true, testObject: { testString: 'test string', testNumber: 12345 }, testArray: [{ myName: 'test name', myNumber: 123245 }] }] };
Tests:
Lodash cloneDeep
testCopy = _.cloneDeep(testArray);
structuredClone
testCopy = structuredClone(testArray);
factory function
testCopy = factory();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Lodash cloneDeep
structuredClone
factory function
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Browser/OS:
Chrome 139 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Lodash cloneDeep
540986.7 Ops/sec
structuredClone
492045.8 Ops/sec
factory function
7789628.0 Ops/sec
Related benchmarks:
Lodash cloneDeep vs native cloneDeep
new Lodash cloneDeep vs native cloneDeep
Lodash cloneDeep vs native cloneDeep vs structuredClone
Lodash cloneDeep vs custom cloneDeep vs structuredClone
structuredClone test
structuredClone test perso
JAVASCRIPTOBJECT DEEP COPY
dsdadsastructuredClone test
structuredClone test (deep only)
Comments
Confirm delete:
Do you really want to delete benchmark?