Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash.isEqual vs JSON.stringify
(version: 0)
Comparing performance of:
JSON.stringify vs _.isEqual
Created:
3 years ago
by:
Guest
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 = [{ "form": { "getFieldsValue": "ƒ () {}", "getFieldValue": "ƒ () {}", "getFieldInstance": "ƒ bound getFieldInstance() {}", "setFieldsValue": "ƒ bound setFieldsValue() {}", "setFields": "ƒ bound setFields() {}", "setFieldsInitialValue": "ƒ () {}", "getFieldDecorator": "ƒ bound getFieldDecorator() {}", "getFieldProps": "ƒ bound getFieldProps() {}", "getFieldsError": "ƒ () {}", "getFieldError": "ƒ () {}", "isFieldValidating": "ƒ () {}", "isFieldsValidating": "ƒ () {}", "isFieldsTouched": "ƒ () {}", "isFieldTouched": "ƒ () {}", "isSubmitting": "ƒ bound isSubmitting() {}", "submit": "ƒ bound submit() {}", "validateFields": "ƒ bound validateFields() {}", "resetFields": "ƒ bound resetFields() {}", "validateFieldsAndScroll": "ƒ bound validateFieldsAndScroll() {}" }, "cablelineProps": { "isFetching": false, "result": "{}", "error": "{}", "lastUpdated": "", "isError": false, "cableLines": "[{…}]", "fieldTabWhiteCallInfo": "[\"cable_line_applyWhiteCall_whiteCallMobiles_mobile…]", "dataTabWhiteCallInfo": "{cable_line_applyWhiteCall_applyWhiteCallAddress1: …}", "contractSelected": "{applyCableLine: {…}, applyWhiteCall: {…}, cableLin…}", "readOnly": true, "activeRowCableline": 2, "isRemoveAttrDoc": false, "fieldTabBaseInfo": "[\"cable_line_base_info_applicantFamilyNameKana\", \"c…]", "dataTabBaseInfo": "{cable_line_base_info_address1: \"愛知県名古屋市西区桝形町\", cab…}", "fieldTabPhoneInfo": "[\"cable_line_phone_info_numberPortability\", \"cable_…]", "dataTabPhoneInfo": "{cable_line_phone_info_currentInternet: \"current_in…}", "fieldTabIdentityInfo": "[\"cable_line_verify_publishMethodId\", \"cable_line_v…]", "dataTabIdentityInfo": "{cable_line_verify_publishMethodId: \"catv_reception…}", "fieldNameResetWhiteCall": "[\"cable_line_applyWhiteCall_whiteCallMobiles_mobile…]" }, "requestAddresses": "ƒ () {}", "findOneBuilding": "ƒ bound findOneBuilding() {}", "addresses": { "address": "[]", "pagenation": "{hasNext: true, hasPrevious: true, page: 1, perPage…}" }, "parentForm": { "getFieldsValue": "ƒ () {}", "getFieldValue": "ƒ () {}", "getFieldInstance": "ƒ bound getFieldInstance() {}", "setFieldsValue": "ƒ bound setFieldsValue() {}", "setFields": "ƒ bound setFields() {}", "setFieldsInitialValue": "ƒ () {}", "getFieldDecorator": "ƒ bound getFieldDecorator() {}", "getFieldProps": "ƒ bound getFieldProps() {}", "getFieldsError": "ƒ () {}", "getFieldError": "ƒ () {}", "isFieldValidating": "ƒ () {}", "isFieldsValidating": "ƒ () {}", "isFieldsTouched": "ƒ () {}", "isFieldTouched": "ƒ () {}", "isSubmitting": "ƒ bound isSubmitting() {}", "submit": "ƒ bound submit() {}", "validateFields": "ƒ bound validateFields() {}", "resetFields": "ƒ bound resetFields() {}", "validateFieldsAndScroll": "ƒ bound validateFieldsAndScroll() {}" }, "readOnlyMode": true, "saveCableLineFieldData": "ƒ () {}" }]; window.bar = [{ "form": { "getFieldsValue": "ƒ () {}", "getFieldValue": "ƒ () {}", "getFieldInstance": "ƒ bound getFieldInstance() {}", "setFieldsValue": "ƒ bound setFieldsValue() {}", "setFields": "ƒ bound setFields() {}", "setFieldsInitialValue": "ƒ () {}", "getFieldDecorator": "ƒ bound getFieldDecorator() {}", "getFieldProps": "ƒ bound getFieldProps() {}", "getFieldsError": "ƒ () {}", "getFieldError": "ƒ () {}", "isFieldValidating": "ƒ () {}", "isFieldsValidating": "ƒ () {}", "isFieldsTouched": "ƒ () {}", "isFieldTouched": "ƒ () {}", "isSubmitting": "ƒ bound isSubmitting() {}", "submit": "ƒ bound submit() {}", "validateFields": "ƒ bound validateFields() {}", "resetFields": "ƒ bound resetFields() {}", "validateFieldsAndScroll": "ƒ bound validateFieldsAndScroll() {}" }, "cablelineProps": { "isFetching": false, "result": "{}", "error": "{}", "lastUpdated": "", "isError": false, "cableLines": "[{…}]", "fieldTabWhiteCallInfo": "[\"cable_line_applyWhiteCall_whiteCallMobiles_mobile…]", "dataTabWhiteCallInfo": "{cable_line_applyWhiteCall_applyWhiteCallAddress1: …}", "contractSelected": "{applyCableLine: {…}, applyWhiteCall: {…}, cableLin…}", "readOnly": true, "activeRowCableline": 2, "isRemoveAttrDoc": false, "fieldTabBaseInfo": "[\"cable_line_base_info_applicantFamilyNameKana\", \"c…]", "dataTabBaseInfo": "{cable_line_base_info_address1: \"愛知県名古屋市西区桝形町\", cab…}", "fieldTabPhoneInfo": "[\"cable_line_phone_info_numberPortability\", \"cable_…]", "dataTabPhoneInfo": "{cable_line_phone_info_currentInternet: \"current_in…}", "fieldTabIdentityInfo": "[\"cable_line_verify_publishMethodId\", \"cable_line_v…]", "dataTabIdentityInfo": "{cable_line_verify_publishMethodId: \"catv_reception…}", "fieldNameResetWhiteCall": "[\"cable_line_applyWhiteCall_whiteCallMobiles_mobile…]" }, "requestAddresses": "ƒ () {}", "findOneBuilding": "ƒ bound findOneBuilding() {}", "addresses": { "address": "[]", "pagenation": "{hasNext: true, hasPrevious: true, page: 1, perPage…}" }, "parentForm": { "getFieldsValue": "ƒ () {}", "getFieldValue": "ƒ () {}", "getFieldInstance": "ƒ bound getFieldInstance() {}", "setFieldsValue": "ƒ bound setFieldsValue() {}", "setFields": "ƒ bound setFields() {}", "setFieldsInitialValue": "ƒ () {}", "getFieldDecorator": "ƒ bound getFieldDecorator() {}", "getFieldProps": "ƒ bound getFieldProps() {}", "getFieldsError": "ƒ () {}", "getFieldError": "ƒ () {}", "isFieldValidating": "ƒ () {}", "isFieldsValidating": "ƒ () {}", "isFieldsTouched": "ƒ () {}", "isFieldTouched": "ƒ () {}", "isSubmitting": "ƒ bound isSubmitting() {}", "submit": "ƒ bound submit() {}", "validateFields": "ƒ bound validateFields() {}", "resetFields": "ƒ bound resetFields() {}", "validateFieldsAndScroll": "ƒ bound validateFieldsAndScroll() {}" }, "readOnlyMode": true, "saveCableLineFieldData": "ƒ () {}" }];
Tests:
JSON.stringify
JSON.stringify(window.foo) === JSON.stringify(window.bar);
_.isEqual
_.isEqual(window.foo, window.bar)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
JSON.stringify
_.isEqual
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):
This appears to be a benchmarking test result, possibly from a tool like Benchmark.js or Jest. The format is quite specific. To summarize the test results: * Two tests are being run: `JSON.stringify` and `_.isEqual`. * Each test has two iterations (executions) with different results. + For `JSON.stringify`, Chrome 105 on Windows executed 171,441 times per second, while the unknown browser executed 60,335 times per second. + For `_isEqual`, Chrome 105 on Windows executed 17,141,428 times per second, while another iteration of the same browser executed 6,033 times per second. * The test data includes a large object with multiple properties, including an array and nested objects. The format is consistent with Benchmark.js or Jest's benchmarking output. If you need help understanding the test results or interpreting them in some way, please provide more context about what you're trying to accomplish!
Related benchmarks:
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings.
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 simple objects
Lodash.isEqual vs JSON.stringify Equality Comparison for objects
Comments
Confirm delete:
Do you really want to delete benchmark?