Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash.isEqual vs JSON.stringify Equality Comparison for deep chart.
(version: 2)
Test on isEqual performance
Comparing performance of:
_.isEqual vs JSON.stringify
Created:
one month ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
window.foo = { "version": "25.0.0", "type": "chart", "id": "Chart 1595529095041", "title": { "type": "chartText", "content": { "type": "esriTS", "color": [ 40, 144, 206, 255 ], "text": "Mean of Ward", "font": { "size": 20, "weight": "bold" } } }, "axes": [ { "type": "chartAxis", "visible": true, "labels": { "type": "chartText", "visible": true, "content": { "type": "esriTS", "color": [ 40, 144, 206, 255 ], "font": { "size": 14, "weight": "bold" } } }, "valueFormat": { "type": "category", "characterLimit": 11 }, "lineSymbol": { "type": "esriSLS", "color": [ 199, 234, 255, 255 ], "width": 1 }, "title": { "type": "chartText", "content": { "type": "esriTS" } } }, { "type": "chartAxis", "visible": true, "labels": { "type": "chartText", "visible": true, "content": { "type": "esriTS", "color": [ 40, 144, 206, 255 ], "font": { "size": 14, "weight": "bold" } } }, "valueFormat": { "type": "number", "intlOptions": { "style": "decimal", "minimumFractionDigits": 0, "maximumFractionDigits": 3 } }, "lineSymbol": { "type": "esriSLS", "color": [ 199, 234, 255, 255 ], "width": 1 }, "grid": { "type": "esriSLS", "color": [ 199, 234, 255, 255 ], "width": 1 }, "title": { "type": "chartText", "content": { "type": "esriTS" } }, "minimum": null, "maximum": null, "integerOnlyValues": false } ], "series": [ { "type": "barSeries", "id": "Ward", "name": "Ward", "query": { "groupByFieldsForStatistics": [ "Primary_Ty" ], "outStatistics": [ { "statisticType": "avg", "onStatisticField": "Ward", "outStatisticFieldName": "AVG_WARD_0" } ] }, "x": "Primary_Ty", "y": "AVG_WARD_0", "fillSymbol": { "type": "esriSFS", "color": [ 166, 206, 227, 178.5 ] }, "dataLabels": { "type": "chartText", "visible": true, "content": { "type": "esriTS", "color": [ 0, 0, 0, 178.5 ], "text": "", "font": { "family": "Arial, Helvetica, sans-serif", "size": 10 } } }, "binTemporalData": false } ], "rotated": false, "colorMatch": false, "orderOptions": { "data": { "orderType": "arcgis-charts-category", "orderBy": "ASC" } }, "stackedType": "sideBySide" }; window.bar = { "version": "25.0.0", "type": "chart", "id": "Chart 1595529095041", "title": { "type": "chartText", "content": { "type": "esriTS", "color": [ 40, 144, 206, 255 ], "text": "Mean of Ward", "font": { "size": 20, "weight": "bold" } } }, "axes": [ { "type": "chartAxis", "visible": true, "labels": { "type": "chartText", "visible": true, "content": { "type": "esriTS", "color": [ 40, 144, 206, 255 ], "font": { "size": 14, "weight": "bold" } } }, "valueFormat": { "type": "category", "characterLimit": 11 }, "lineSymbol": { "type": "esriSLS", "color": [ 199, 234, 255, 255 ], "width": 1 }, "title": { "type": "chartText", "content": { "type": "esriTS" } } }, { "type": "chartAxis", "visible": true, "labels": { "type": "chartText", "visible": true, "content": { "type": "esriTS", "color": [ 40, 144, 206, 255 ], "font": { "size": 14, "weight": "bold" } } }, "valueFormat": { "type": "number", "intlOptions": { "style": "decimal", "minimumFractionDigits": 0, "maximumFractionDigits": 3 } }, "lineSymbol": { "type": "esriSLS", "color": [ 199, 234, 255, 255 ], "width": 1 }, "grid": { "type": "esriSLS", "color": [ 199, 234, 255, 255 ], "width": 1 }, "title": { "type": "chartText", "content": { "type": "esriTS" } }, "minimum": null, "maximum": null, "integerOnlyValues": false } ], "series": [ { "type": "barSeries", "id": "Ward", "name": "Ward", "query": { "groupByFieldsForStatistics": [ "Primary_Ty" ], "outStatistics": [ { "statisticType": "avg", "onStatisticField": "Ward", "outStatisticFieldName": "AVG_WARD_0" } ] }, "x": "Primary_Ty", "y": "AVG_WARD_0", "fillSymbol": { "type": "esriSFS", "color": [ 166, 206, 227, 178.5 ] }, "dataLabels": { "type": "chartText", "visible": true, "content": { "type": "esriTS", "color": [ 0, 0, 0, 178.5 ], "text": "", "font": { "family": "Arial, Helvetica, sans-serif", "size": 10 } } }, "binTemporalData": false } ], "rotated": false, "colorMatch": false, "orderOptions": { "data": { "orderType": "arcgis-charts-category", "orderBy": "ASC" } }, "stackedType": "sideBySide" };
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:
Run details:
(Test run date:
one month ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Browser/OS:
Chrome 145 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
_.isEqual
137830.6 Ops/sec
JSON.stringify
524524.6 Ops/sec
Related benchmarks:
fork Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings.
Lodash.isEqual vs JSON.stringify Equality Comparison for markup object.
Lodash.isEqual vs JSON.stringify Equality Comparison for markup object ver2.
Lodash.isEqual vs JSON.stringify big object
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings.c
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings.214
Lodash.isEqual vs JSON.stringify Equality Comparison for deep objects
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Object
Lodash.isEqual vs JSON.stringify Equality Comparison for Deep Array of Objects
Comments
Confirm delete:
Do you really want to delete benchmark?