Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
lodash cloneDeep vs structuredClone on larger object and with arrays
as in name
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/124.0.0.0 Safari/537.36
Browser:
Chrome 124
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
lodash
18389.0 Ops/sec
structuredClone
17062.3 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:
var MyObject = [ { "id": 58, "windows": [ { "id": 84, "locations": [ { "id": 101, "type": { "id": 1, "name": "LMS" }, "clli": "1233535-WERER", "city": "Try", "state": "UG", "updateTime": "2024-05-19T03:41:16.828181Z", "updateUser": "me@me.com" }, { "id": 123, "type": { "id": 2, "name": "Non-Site Location of Work" }, "clli": "686868-JKIJ", "city": "Rome", "state": "Italy", "updateTime": "2024-05-16T03:44:21.027202Z", "updateUser": "me@me.com" } ], "state": { "id": 2, "name": "WIP" }, "windowName": "Window-11", "windowStartDate": "2024-05-16T04:51:53Z", "windowEndDate": "2024-05-17T04:51:56Z", "previousStartDate": null, "previousEndDate": null, "windowDuration": 86403, "alternateNight": false, "completionCodeLevel1": null, "completionCodeLevel2": null, "completionCodeLevel3": null, "updateTime": "2024-05-20T07:56:12.645614Z", "updateUser": "gurpal.kundi-p@brightspeed.com" } ], "affectedObjectName": "ao-09876", "legacyNetwork": "lumen", "unprotectedOutageDurationMs": 68, "unprotectedOutageDurationType": "MS", "protectedOutageDurationMs": 64, "protectedOutageDurationType": "MS", "updateTime": "2024-05-19T06:52:59.404136Z", "updateUser": "me@me.com", "_links": { "self": { "href": "/gcrservices/api/ticketAffectedObjects/58" }, "ticketAffectedObject": { "href": "/gcrservices/api/ticketAffectedObjects/58" }, "ticketWindows": { "href": "/gcrservices/api/ticketAffectedObjects/58/ticketWindows" }, "ticketServiceImpacts": { "href": "/gcrservices/api/ticketAffectedObjects/58/ticketServiceImpacts" }, "ticket": { "href": "/gcrservices/api/ticketAffectedObjects/58/ticket" } } }, { "id": 59, "windows": [ { "id": 85, "locations": [ { "id": 101, "type": { "id": 1, "name": "LMS" }, "clli": "1233535-WERER", "city": "Try", "state": "UG", "updateTime": "2024-05-19T03:41:16.828181Z", "updateUser": "me@me.com" }, { "id": 100, "type": { "id": 1, "name": "LMS" }, "clli": "12345-uhj3454", "city": "Bit", "state": "LO", "updateTime": "2024-05-16T03:43:50.083512Z", "updateUser": "me@me.com" } ], "state": { "id": 1, "name": "New" }, "windowName": "Window-11b", "windowStartDate": "2024-05-29T04:52:41Z", "windowEndDate": "2024-05-30T04:52:43Z", "previousStartDate": null, "previousEndDate": null, "windowDuration": 86402, "alternateNight": false, "completionCodeLevel1": null, "completionCodeLevel2": null, "completionCodeLevel3": null, "updateTime": "2024-05-20T05:02:39.836078Z", "updateUser": "gurpal.kundi-p@brightspeed.com" } ], "affectedObjectName": "ao-09876", "legacyNetwork": "lumen", "unprotectedOutageDurationMs": 68, "unprotectedOutageDurationType": "MS", "protectedOutageDurationMs": 64, "protectedOutageDurationType": "MS", "updateTime": "2024-05-19T06:53:05.105813Z", "updateUser": "me@me.com", "_links": { "self": { "href": "/gcrservices/api/ticketAffectedObjects/59" }, "ticketAffectedObject": { "href": "/gcrservices/api/ticketAffectedObjects/59" }, "ticketWindows": { "href": "/gcrservices/api/ticketAffectedObjects/59/ticketWindows" }, "ticketServiceImpacts": { "href": "/gcrservices/api/ticketAffectedObjects/59/ticketServiceImpacts" }, "ticket": { "href": "/gcrservices/api/ticketAffectedObjects/59/ticket" } } }, { "id": 60, "windows": [ { "id": 86, "locations": [ { "id": 100, "type": { "id": 1, "name": "LMS" }, "clli": "12345-uhj3454", "city": "Bit", "state": "LO", "updateTime": "2024-05-16T03:43:50.083512Z", "updateUser": "me@me.com" } ], "state": { "id": 1, "name": "New" }, "windowName": "Window-12", "windowStartDate": "2024-05-20T14:57:54Z", "windowEndDate": "2024-05-21T14:57:59Z", "previousStartDate": null, "previousEndDate": null, "windowDuration": 86405, "alternateNight": true, "completionCodeLevel1": null, "completionCodeLevel2": null, "completionCodeLevel3": null, "updateTime": "2024-05-16T14:58:11.538215Z", "updateUser": "Gurpal.Kundi@brightspeed.com" } ], "affectedObjectName": "ao-1234111", "legacyNetwork": "spectrum", "unprotectedOutageDurationMs": 540000, "unprotectedOutageDurationType": "MIN", "protectedOutageDurationMs": 65444, "protectedOutageDurationType": "MS", "updateTime": "2024-05-19T06:53:09.671428Z", "updateUser": "me@me.com", "_links": { "self": { "href": "/gcrservices/api/ticketAffectedObjects/60" }, "ticketAffectedObject": { "href": "/gcrservices/api/ticketAffectedObjects/60" }, "ticketWindows": { "href": "/gcrservices/api/ticketAffectedObjects/60/ticketWindows" }, "ticketServiceImpacts": { "href": "/gcrservices/api/ticketAffectedObjects/60/ticketServiceImpacts" }, "ticket": { "href": "/gcrservices/api/ticketAffectedObjects/60/ticket" } } }, { "id": 61, "windows": [ { "id": 84, "locations": [ { "id": 101, "type": { "id": 1, "name": "LMS" }, "clli": "1233535-WERER", "city": "Try", "state": "UG", "updateTime": "2024-05-19T03:41:16.828181Z", "updateUser": "me@me.com" }, { "id": 123, "type": { "id": 2, "name": "Non-Site Location of Work" }, "clli": "686868-JKIJ", "city": "Rome", "state": "Italy", "updateTime": "2024-05-16T03:44:21.027202Z", "updateUser": "me@me.com" } ], "state": { "id": 2, "name": "WIP" }, "windowName": "Window-11", "windowStartDate": "2024-05-16T04:51:53Z", "windowEndDate": "2024-05-17T04:51:56Z", "previousStartDate": null, "previousEndDate": null, "windowDuration": 86403, "alternateNight": false, "completionCodeLevel1": null, "completionCodeLevel2": null, "completionCodeLevel3": null, "updateTime": "2024-05-20T07:56:12.645614Z", "updateUser": "gurpal.kundi-p@brightspeed.com" } ], "affectedObjectName": "ao-8232323", "legacyNetwork": "nice", "unprotectedOutageDurationMs": 7200000, "unprotectedOutageDurationType": "HRS", "protectedOutageDurationMs": 180000, "protectedOutageDurationType": "MIN", "updateTime": "2024-05-19T06:53:18.271138Z", "updateUser": "me@me.com", "_links": { "self": { "href": "/gcrservices/api/ticketAffectedObjects/61" }, "ticketAffectedObject": { "href": "/gcrservices/api/ticketAffectedObjects/61" }, "ticketWindows": { "href": "/gcrservices/api/ticketAffectedObjects/61/ticketWindows" }, "ticketServiceImpacts": { "href": "/gcrservices/api/ticketAffectedObjects/61/ticketServiceImpacts" }, "ticket": { "href": "/gcrservices/api/ticketAffectedObjects/61/ticket" } } } ] var myCopy = null;
Tests:
lodash
myCopy = _.cloneDeep(MyObject);
structuredClone
myCopy = structuredClone(MyObject);