Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash.isEqual vs JSON.stringify Equality Comparison for deep objects
(version: 0)
Test on isEqual performance
Comparing performance of:
_.isEqual vs JSON.stringify
Created:
3 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.5/lodash.min.js"></script>
Script Preparation code:
window.foo = [{ "type": "heading-one", "children": [{ "text": "shdf " }, { "text": "jh", "highlight": true }, { "highlight": true, "text": "sqjd", "italic": true }, { "highlight": true, "text": "klh" }, { "text": " kjsdhg kljhqsdlkgjh kjsqdhgkjh kjgh dfksjg" } ] }, { "type": "paragraph", "children": [{ "text": "" }] }, { "type": "paragraph", "children": [{ "text": "sdf kj lksqdfj ", "bold": true }, { "type": "mention", "user": { "name": "AAA AAA", "id": 117 }, "children": [{ "text": "@AAA AAA" }] }, { "text": " okokokoko" } ] }, { "type": "paragraph", "children": [{ "bold": true, "text": "sqdglkgqsd" }] }, { "type": "paragraph", "children": [{ "bold": true, "text": "" }] }, { "type": "heading-one", "children": [{ "bold": true, "text": "sqdgqsdgjh klhqdsglj hksqjdgh sqdg" }] }, { "type": "heading-two", "children": [{ "bold": true, "text": "sdgf ldsjfgdsfg sfgd s" }] }, { "type": "paragraph", "children": [{ "text": "dfsg dfsgj sdfsqdf qkjsdhg kjhqdljkgh qsdg" }] }, { "type": "paragraph", "children": [{ "text": "" }, { "type": "link", "url": "http://www.google.fr", "children": [{ "text": "sqd lfjlksdjfq mlkjsqdf sjdkf" }] }, { "text": " qds jhdsqfkjh jkqshf " }, { "text": "jhqskdjhfq", "italic": true, "bold": true }, { "text": " jklsfdjsf" } ] }, { "type": "paragraph", "children": [{ "text": "" }] }, { "type": "block-quote", "children": [{ "text": "qs glqdsgkhqljkdhsg hqdskjgh qjskgh sklqjsdglqs jdgqkjdh qsdkjgh lkjqsdg jkqdshgks dqjgjsd gkjshdjghhgghdjgh skdjgh kjdsh lqkjshgjkdg" }] }, { "type": "ordered-list", "children": [{ "type": "list-item", "children": [{ "text": "sdg lkgsj lkkhg kjhg jkhg " }, { "text": "kjhjjjj", "italic": true } ] }, { "type": "list-item", "children": [{ "text": "dsflgh jkdsfhg " }, { "text": "ljkhdlsfkjgh", "bold": true }, { "text": " jsdkfgh jhdfgkj" } ] }, { "type": "list-item", "children": [{ "text": "dfsgjkh " }, { "text": "ksdjfghl", "highlight": true }, { "text": " ksdfglksdfjgfdkgj " }, { "type": "mention", "user": { "name": "AAA AAA", "id": 9 }, "children": [{ "text": "@AAA AAA" }] }, { "text": " dflkjgldfkgj kgf" } ] } ] }, { "type": "heading-one", "children": [{ "text": "jshdf kjsfkjhksjdf ksjf klqjsdfhqsd" }] }, { "type": "paragraph", "children": [{ "text": "qs kdfsqjdfkjh kjqdsf lkjqsdhfjhdsjhf jkdhfkjsd" }] }, { "type": "paragraph", "children": [{ "text": "sdjfh kjdshfs dkfjh " }, { "text": "jsdhf", "bold": true }, { "text": " jh kjds dsjkfh kdjsh jkhsd" } ] } ]; window.bar = [{ "type": "heading-one", "children": [{ "text": "shdf " }, { "text": "jh", "highlight": true }, { "highlight": true, "text": "sqjd", "italic": true }, { "highlight": true, "text": "klh" }, { "text": " kjsdhg kljhqsdlkgjh kjsqdhgkjh kjgh dfksjg" } ] }, { "type": "paragraph", "children": [{ "text": "" }] }, { "type": "paragraph", "children": [{ "text": "sdf kj lksqdfj ", "bold": true }, { "type": "mention", "user": { "name": "AAA AAA", "id": 117 }, "children": [{ "text": "@AAA AAA" }] }, { "text": " okokokoko" } ] }, { "type": "paragraph", "children": [{ "bold": true, "text": "sqdglkgqsd" }] }, { "type": "paragraph", "children": [{ "bold": true, "text": "" }] }, { "type": "heading-one", "children": [{ "bold": true, "text": "sqdgqsdgjh klhqdsglj hksqjdgh sqdg" }] }, { "type": "heading-two", "children": [{ "bold": true, "text": "sdgf ldsjfgdsfg sfgd s" }] }, { "type": "paragraph", "children": [{ "text": "dfsg dfsgj sdfsqdf qkjsdhg kjhqdljkgh qsdg" }] }, { "type": "paragraph", "children": [{ "text": "" }, { "type": "link", "url": "http://www.google.fr", "children": [{ "text": "sqd lfjlksdjfq mlkjsqdf sjdkf" }] }, { "text": " qds jhdsqfkjh jkqshf " }, { "text": "jhqskdjhfq", "italic": true, "bold": true }, { "text": " jklsfdjsf" } ] }, { "type": "paragraph", "children": [{ "text": "" }] }, { "type": "block-quote", "children": [{ "text": "qs glqdsgkhqljkdhsg hqdskjgh qjskgh sklqjsdglqs jdgqkjdh qsdkjgh lkjqsdg jkqdshgks dqjgjsd gkjshdjghhgghdjgh skdjgh kjdsh lqkjshgjkdg" }] }, { "type": "ordered-list", "children": [{ "type": "list-item", "children": [{ "text": "sdg lkgsj lkkhg kjhg jkhg " }, { "text": "kjhjjjj", "italic": true } ] }, { "type": "list-item", "children": [{ "text": "dsflgh jkdsfhg " }, { "text": "ljkhdlsfkjgh", "bold": true }, { "text": " jsdkfgh jhdfgkj" } ] }, { "type": "list-item", "children": [{ "text": "dfsgjkh " }, { "text": "ksdjfghl", "highlight": true }, { "text": " ksdfglksdfjgfdkgj " }, { "type": "mention", "user": { "name": "AAA AAA", "id": 9 }, "children": [{ "text": "@AAA AAA" }] }, { "text": " dflkjgldfkgj kgf" } ] } ] }, { "type": "heading-one", "children": [{ "text": "jshdf kjsfkjhksjdf ksjf klqjsdfhqsd" }] }, { "type": "paragraph", "children": [{ "text": "qs kdfsqjdfkjh kjqdsf lkjqsdhfjhdsjhf jkdhfkjsd" }] }, { "type": "paragraph", "children": [{ "text": "sdjfh kjdshfs dkfjh " }, { "text": "jsdhf", "bold": true }, { "text": " jh kjds dsjkfh kdjsh jkhsd" } ] } ];
Tests:
_.isEqual
_.isEqual(window.foo, window.bar)
JSON.stringify
JSON.stringify(window.foo) === JSON.stringify(window.bar);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
_.isEqual
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):
I'll answer the question based on the provided benchmark result. The benchmark result shows two tests: `JSON.stringify` and `_.isEqual`. The test results are: * `JSON.stringify`: 38394.421875 executions per second * `_.isEqual`: 16238.1201171875 executions per second To provide a helpful answer, I'll need to know what the question is asking about these benchmark results. Is it related to performance comparison between the two tests? Or perhaps something else? If you'd like me to analyze the data and provide insights on the performance of `JSON.stringify` versus `_.isEqual`, I'm ready!
Related benchmarks:
Lodash.isEqual vs JSON.stringify Equality Comparison for Plain Objects
Lodash.isEqual vs JSON.stringify Equality Comparison for Small Objects.
Lodash.isEqual vs JSON.stringify Equality Comparison for Small Objects, with differences.
Lodash.isEqual vs JSON.stringify Equality Comparison for deep objects.
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Object of Strings.
Comments
Confirm delete:
Do you really want to delete benchmark?