Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
_.isEqual vs JSON.stringify() comparison
(version: 0)
Comparing performance of:
isEqual vs JSON.stringify compare
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:
a = [ { "name": "block domain_0", "description": "", "entities": { "all": true, "groups": [], "users": [] }, "disable_log": false, "reason": "", "source_ip_match": { "any_ip": true, "values": [] }, "rule": { "action": "block", "category": [], "categories": [], "domain": [ { "domainName": "cnn.com", "path": "", "relation": "starts_with" } ], "domains": [], "locations": [], "top_level_risk": [], "policy_headers": [] }, "tags": [], "type": "domain", "enforcement_times": { "mode": "time_of_day", "enabled": false, "useDifferentTimeSlots": false, "startDateTime": null, "endDateTime": null, "daysOfWeek": { "days": [ "1", "2", "3", "4", "5" ], "times": [ { "startTime": "09:00:00", "endTime": "17:00:00" } ] }, "timeZones": [ "menlo_cloud_region" ] }, "uuid": "2fa63b08-07ab-4df4-a0ec-4f5157a76489", "created_at": 1654153399452, "updated_at": 1654154262909, "updatedBy": "khanh.nguyen@menlosecurity.com" }, { "name": "block domain_1", "description": "", "entities": { "all": true, "groups": [], "users": [] }, "reason": "", "rule": { "action": "allow", "category": [], "categories": [], "domain": [ { "domainName": "exampledomain1.com", "path": "", "relation": "starts_with" } ], "domains": [], "locations": [], "top_level_risk": [], "policy_headers": [] }, "tags": [], "type": "domain", "enforcement_times": { "mode": "time_of_day", "enabled": false, "useDifferentTimeSlots": false, "startDateTime": null, "endDateTime": null, "daysOfWeek": {}, "timeZones": [ "menlo_cloud_region" ] }, "uuid": "f8d8c45c-cec0-45b7-85f1-8564d49208ae", "created_at": 1654153399452, "updated_at": 1654153399452, "updatedBy": "khanh.nguyen@menlosecurity.com" }]; b = [ { "name": "block domain_0", "description": "", "entities": { "all": true, "groups": [], "users": [] }, "disable_log": false, "reason": "", "source_ip_match": { "any_ip": true, "values": [] }, "rule": { "action": "block", "category": [], "categories": [], "domain": [ { "domainName": "cnn.com", "path": "", "relation": "starts_with" } ], "domains": [], "locations": [], "top_level_risk": [], "policy_headers": [] }, "tags": [], "type": "domain", "enforcement_times": { "mode": "time_of_day", "enabled": false, "useDifferentTimeSlots": false, "startDateTime": null, "endDateTime": null, "daysOfWeek": { "days": [ "1", "2", "3", "4", "5" ], "times": [ { "startTime": "09:00:00", "endTime": "17:00:00" } ] }, "timeZones": [ "menlo_cloud_region" ] }, "uuid": "2fa63b08-07ab-4df4-a0ec-4f5157a76489", "created_at": 1654153399452, "updated_at": 1654154262909, "updatedBy": "khanh.nguyen@menlosecurity.com" }, { "name": "block domain_1", "description": "", "entities": { "all": true, "groups": [], "users": [] }, "reason": "", "rule": { "action": "allow", "category": [], "categories": [], "domain": [ { "domainName": "exampledomain1.com", "path": "", "relation": "starts_with" } ], "domains": [], "locations": [], "top_level_risk": [], "policy_headers": [] }, "tags": [], "type": "domain", "enforcement_times": { "mode": "time_of_day", "enabled": false, "useDifferentTimeSlots": false, "startDateTime": null, "endDateTime": null, "daysOfWeek": {}, "timeZones": [ "menlo_cloud_region" ] }, "uuid": "f8d8c45c-cec0-45b7-85f1-8564d49208ae", "created_at": 1654153399452, "updated_at": 1654153399452, "updatedBy": "khanh.nguyen@menlosecurity.com" }];
Tests:
isEqual
_.isEqual(a,b);
JSON.stringify compare
JSON.stringify(a) === JSON.stringify(b);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
isEqual
JSON.stringify compare
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 seems like you've provided a large amount of data, but I'll do my best to extract the relevant information and answer your question. It appears that you're working with benchmarking data, specifically JSON objects representing benchmarks, tests, and results. Here's what I can gather: **Benchmark Data** You have two sets of benchmark data: 1. **Domain Benchmark Data**: ```json [ { "name": "domain_1", "description": "", "entities": { "all": true, "groups": [], "users": [] }, ... }, { "name": "domain_2", "description": "", "entities": { "all": true, "groups": [], "users": [] }, ... } ] ``` These objects contain information about domains, such as their name, description, entities (e.g., groups, users), and other properties. **Individual Test Cases** You have two individual test cases: 1. **JSON.stringify compare**: ```json { "Benchmark Definition": "JSON.stringify(a) === JSON.stringify(b);", "Test Name": "JSON.stringify compare" } ``` This test case defines a benchmark that compares the output of `JSON.stringify()` on two inputs. 2. **isEqual**: ```json { "Benchmark Definition": "_.isEqual(a,b);", "Test Name": "isEqual" } ``` This test case defines a benchmark that uses the `lodash.isEqual()` function to compare two inputs. **Latest Benchmark Result** You have the latest benchmark result, which includes execution data for both tests: ```json [ { "RawUAString": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36", "Browser": "Chrome 102", "DevicePlatform": "Desktop", "OperatingSystem": "Windows", "ExecutionsPerSecond": 79883.9921875, "TestName": "JSON.stringify compare" }, { "RawUAString": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36", "Browser": "Chrome 102", "DevicePlatform": "Desktop", "OperatingSystem": "Windows", "ExecutionsPerSecond": 61947.76953125, "TestName": "isEqual" } ] ``` This result shows the execution data for both tests, including the browser type, device platform, operating system, and number of executions per second. Please let me know how I can assist you further!
Related benchmarks:
Lodash.isEqual vs JSON.stringify Equality Comparison for Deep Array of Strings.
Lodash.isEqual vs JSON.stringify Equality Comparison for Deep Array of Strings non-equals
Lodash.isEqual vs JSON.stringify Equality Comparison for array of objects with nested properties and many records
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of objects
Lodash.isEqual vs JSON.stringify Equality Comparison for array of objects with nested properties and lots of records 222weqeqrq
Comments
Confirm delete:
Do you really want to delete benchmark?