Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash cloneDeep vs JSON parse+stringify test
(version: 0)
Comparing performance of:
Lodash cloneDeep vs Json stringify
Created:
4 years 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 MyObject = { "accessoire": { "cumulable": "false", "dateDebut": "2019-09-26", "dateFin": "2019-10-03", "duree": "7", "id": "6796669", "prix": [ { "montant": "20.00", "referencePersonne": "A" }, { "montant": "20.00", "referencePersonne": "B" } ], "sousTypeRessource": "rezrzerze", "typeRessource": "fdsfdsf" }, "fdsfsdfs": { "cvxcvxcvx": "zerzerzer", "codeDevise": "EUR", "codePaysCommercial": "010", "codeReseauDistribution": "vcxvxcvxc" }, "codePaysGeographique": "133", "codePeriodeCommerciale": "dfdsffdsf", "dateCreation": "2019-08-27T13:27:56-03:00", "dateReservation": "2019-08-27", "gergretre": { "gfdgfde": "gfdhgf" }, "id": "1", "montantBookNow": "0.00", "montantDynamicPricing": "0.00", "numeroProposition": "1", "personne": [ { "age": "40", "id": "3722852", "reference": "gfdgd" }, { "age": "40", "id": "3722853", "reference": "fdsfsdf" } ], "promotion": [ { "codeMessage": "31378", "codePromotion": "", "codeReduction": "TEST", "numeroTarif": null, "prix": [ { "montant": "-372.00", "referencePersonne": "fdsfsdf" }, { "montant": "-372.00", "referencePersonne": "azeaze" } ], "bvcbvcb": "false", "typeBaseCalculPourcentage": "", "typeProduitPromotion": "", "typePromotion": "" }, { "codeMessage": "0", "codePromotion": "gfdgfdg", "codeReduction": "gfdgfdg", "numeroTarif": null, "prix": [ { "montant": "-408.00", "referencePersonne": "azezaeaz" }, { "montant": "-408.00", "referencePersonne": "dazezez" } ], "promotionCible": "false", "typeBaseCalculPourcentage": "SE", "typeProduitPromotion": "SE", "typePromotion": "gfdgdf" } ], "tretreter": { "fgfdggfd": "false", "bgfhhgfh": "false" }, "fdsfsdf": { "cvcxvcxv": "gfdgdf", "codeFormule": "gdfgdfgd", "codeRessource": "gfdgdfgdf", "cumulable": "true", "dateDebut": "2019-09-26", "dateFin": "2019-10-03", "duree": "7", "id": "6796670", "logementCommercial": { "dsqdqdz": "16", "dsqdqsdq": "0", "vcxvxcv": "fsdfdsf", "dsqdq": "2", "id": "fsdfdsfsdf", "nombreLogement": "1", "referencePersonne": [ "derzerze", "fdsfsd" ], "topGestionLitBebe": "false", "dsfdfsd": "fdsfsdfs" }, "numeroOrdrePackage": "0", "prix": [ { "montant": "1240.00", "referencePersonne": "fsdfsdfsd" }, { "montant": "1240.00", "referencePersonne": "qsdqdqze" } ], "rezrzr": "false", "vcxvxv": "CE", "typeFormule": "gfgdfgv", "typeRessource": "bvcbcvbc" }, "service": { "sfdfsdfs": "dsqdqsd", "rezrzere": "0", "gfgdfg": "0", "codeRessource": "bvcbccv", "cumulable": "false", "dateDebut": "2019-09-26", "dateFin": "2019-10-03", "duree": "7", "id": "6796672", "inclusForfait": "true", "natureService": "G", "fdsfsdfsdf": "0", "prix": [ { "montant": "0.00", "referencePersonne": "dqsdqsd" }, { "montant": "0.00", "referencePersonne": "dsqdqsd" } ], "fdsfsfez": { "codeRessource": "bvcbvcbc", "dateDebut": "2019-09-26", "numeroOrdrePackage": "0", "typeRessource": "SE" }, "sousTypeRessource": "CB", "trancheHoraire": null, "typeRessource": "sdqzea" }, "statut": "vcxvxcv", "ghtrytry": "fdsfsdfdbvcb", "locale": "fr-FR" } ; var myCopy = null;
Tests:
Lodash cloneDeep
myCopy = _.cloneDeep(MyObject);
Json stringify
myCopy = JSON.parse(JSON.stringify(MyObject));
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Lodash cloneDeep
Json stringify
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It looks like we're dealing with a large JSON object and some benchmarking data. To answer your question, I'll need to make an assumption about what you'd like me to do. Since there's no specific question asked, I'll provide a general answer based on the provided information: **JSON Object** The provided JSON object appears to be a complex nested structure with multiple objects and arrays. It seems to represent some kind of data, possibly related to a logement (rental) or person. **Benchmarking Data** There are two benchmarking test cases: `Lodash cloneDeep` and `Json stringify`. These tests compare the performance of two different methods for cloning or serializing the provided JSON object using Lodash and the built-in `JSON.stringify` method, respectively. To provide a helpful answer, I'd need to know what specific question or problem you're trying to solve. Are you: 1. Trying to understand the difference between these two methods? 2. Comparing their performance in a specific use case? 3. Optimizing one of these methods for better performance? Please clarify your question or provide more context so I can give you a more accurate and helpful response.
Related benchmarks:
Lodash deep clone vs JSON.stringfy
Lodash cloneDeep vs JSON Clone with Array
cloneDeep vs JSON stringify + parse (long arr)
lodash cloneDeep vs json.stringify
Lodash cloneDeep vs JSON parse
Comments
Confirm delete:
Do you really want to delete benchmark?