Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
isequal 2024-1
(version: 0)
Comparing performance of:
isequal 1-2 vs isEqual 3-4 vs stringify 1-2 vs stringify 3-4
Created:
2 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.data1 = { "2024/02/12": [ "0fcf707f-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/13": [ "0fcf88bd-cbd5-11ee-b8ea-0242ac180002", "0fcfa627-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/14": [ "6de124ba-61ae-40dc-817f-3739ec5b96c7" ], "2024/02/15": [ "9cd4c22f-3228-4022-b151-0e6ad60dcab6" ], "2024/02/16": [ "0fd0b7d1-cbd5-11ee-b8ea-0242ac180002", "0fd0cbd2-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/17": [ "0fd11dfe-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/18": [ "0fd13146-cbd5-11ee-b8ea-0242ac180002" ] }; window.data2 = { "2024/02/12": [ "0fcf707f-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/13": [ "0fcf88bd-cbd5-11ee-b8ea-0242ac180002", "0fcfa627-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/14": [ "6de124ba-61ae-40dc-817f-3739ec5b96c7" ], "2024/02/15": [ "9cd4c22f-3228-4022-b151-0e6ad60dcab6" ], "2024/02/16": [ "0fd0b7d1-cbd5-11ee-b8ea-0242ac180002", "0fd0cbd2-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/17": [ "0fd11dfe-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/18": [ "0fd13146-cbd5-11ee-b8ea-0242ac180002" ] }; window.data3 = { "2024/02/12": [ "0fcf707f-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/13": [ "0fcf88bd-cbd5-11ee-b8ea-0242ac180002", "0fcfa627-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/14": [ "6de124ba-61ae-40dc-817f-3739ec5b96c7" ], "2024/02/15": [ "9cd4c22f-3228-4022-b151-0e6ad60dcab6" ], "2024/02/16": [ "0fd0b7d1-cbd5-11ee-b8ea-0242ac180002", "0fd0cbd2-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/17": [ "0fd11dfe-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/18": [ "0fd13146-cbd5-11ee-b8ea-0242ac180002" ] }; window.data4 = { "2024/02/18": [ "0fd13146-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/12": [ "0fcf707f-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/13": [ "0fcf88bd-cbd5-11ee-b8ea-0242ac180002", "0fcfa627-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/14": [ "6de124ba-61ae-40dc-817f-3739ec5b96c7" ], "2024/02/15": [ "9cd4c22f-3228-4022-b151-0e6ad60dcab6" ], "2024/02/16": [ "0fd0b7d1-cbd5-11ee-b8ea-0242ac180002", "0fd0cbd2-cbd5-11ee-b8ea-0242ac180002" ], "2024/02/17": [ "0fd11dfe-cbd5-11ee-b8ea-0242ac180002" ] };
Tests:
isequal 1-2
_.isEqual(window.data1, window.data2)
isEqual 3-4
_.isEqual(window.data3, window.data4)
stringify 1-2
JSON.stringify(window.data1) === JSON.stringify(window.data2);
stringify 3-4
JSON.stringify(window.data3) === JSON.stringify(window.data4);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
isequal 1-2
isEqual 3-4
stringify 1-2
stringify 3-4
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 years ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser/OS:
Chrome 121 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
isequal 1-2
593505.6 Ops/sec
isEqual 3-4
608302.2 Ops/sec
stringify 1-2
617360.6 Ops/sec
stringify 3-4
615173.7 Ops/sec
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
To answer your question, I'll need to break it down into parts. It appears you have a JSON object `window.data4` with several key-value pairs representing dates and IDs. You also have a code snippet for an HTML file that includes the Lodash library. You're testing four different benchmark scenarios using Lodash: 1. `_.isEqual(window.data1, window.data2)` (Not shown in the provided data) 2. `_.isEqual(window.data3, window.data4)` 3. `JSON.stringify(window.data1) === JSON.stringify(window.data2)` (Not shown in the provided data) 4. `JSON.stringify(window.data3) === JSON.stringify(window.data4)` You also have a set of test results for these benchmark scenarios, including browser information and execution rates. **Key Takeaways:** * The Lodash library is used to compare objects with equality (`_.isEqual`) * You're testing the equality of two object values (window.data1 and window.data2, or window.data3 and window.data4) * You're also comparing JSON strings representing these objects (window.data1 and window.data2, or window.data3 and window.data4) **Question:** Without seeing the code for `window.data1` and `window.data2`, I can only speculate about the results. If you provide more information or context, I'd be happy to help further. If we assume that `window.data1` and `window.data2` are identical (same data), but represented as different objects in Lodash (`_.isEqual`), then we expect the test result for `isequal 1-2` should be `true`. Given the provided benchmark results, I can calculate some statistics about these tests: **Test Statistics:** * Average execution rate per second: * `isequal 1-2`: 593.505625 * `isEqual 3-4`: 608.3021875 * `stringify 1-2`: 617.3605625 * `stringify 3-4`: 615.1736875 * Execution rate variability (standard deviation): * `isequal 1-2`: ~40-50% * `isEqual 3-4`: ~30-40% * `stringify 1-2`: ~10-20% * `stringify 3-4`: ~15-25% Keep in mind that these statistics are based solely on the provided data and might not be representative of the entire testing process. **Potential Issues:** If you notice any unusual patterns or inconsistencies, consider the following: * Lodash implementation issues or compatibility problems * Data encoding/decoding differences (e.g., string representation) * Testing framework limitations Let me know if I can help with anything else!
Related benchmarks:
Split string
IndexOf vs Includes vs lodash includes LARGE
_isEqual vs. .every()
isequal 2024
Comments
Confirm delete:
Do you really want to delete benchmark?