Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings. kap
(version: 0)
Test on isEqual performance
Comparing performance of:
_.isEqual vs JSON.stringify
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.foo = { "Wingman Identification Letter/Number": "A", "Force Tell Indicator": false, "Mission Commander Indicator": false, "Geodetic Position Quality": ">18080 FT", "Latitude": 33.883431850416805, "Air Platform": "CIVIL, AIRLINER", "J-Series": "J2.2", "Active Relay Indicator, Voice Channel": false, "R2 is Held": false, "Speed (Knots)": 477.9369349024706, "Emergency Indicator": false, "SupportsAmpData": false, "Identity": "FRIEND", "Course": 136, "Active Relay Indicator, WAN": false, "Exercise Indicator": false, "Network Participation Status Indicator": "ACTIVE-NON SPECIFIC", "PPLI (Raw)": true, "Is Command Objective": false, "Longitude": -112.52151831505019, "PCT_Identifiers": { "PCT": "P-120895", "PCT L16": "41077" }, "Altitude (M)": 16306.800000000001, "Air Activity": "XRAY", "Environment": "AIR", "Track Number, Mission Commander": "45354", "Record Type": "ReceivedAirPPLIRecord", "Simulation Indicator": true, "Is Connection Target": false, "Airborne Indicator": true, "Time of Reception": "2024-02-20T20:00:04.773561Z", "Speed (M/S)": 245.87199999921322, "Control Channel": 42, "Voice Call Sign Indicator": false, "Data Valid Time (Raw)": 1708459204766, "Flight Leader Indicator": false, "Voice Frequency/Channel": "Channel A 4", "Record Status": "Remote", "Speed (DMH)": 484, "PCT_Display_TN": "41077", "NonC2 JU-to-NonC2 JU NPG Status B": false, "IsEntity": true, "Time of Reception (Raw)": 1708459204773, "Bailout Indicator": false, "NonC2 JU-to-NonC2 JU NPG Status A": false, "RTT Reply Status Indicator": false, "Geometry": { "type": "Point", "coordinates": [ -112.52151831505019, 33.883431850416805, 53500 ] }, "Altitude (Ft)": 53500, "Track Number, Source": "41077", "Command and Control Indicator": false, "Net Number, NonC2 JU-to-NonC2 JU NPG B": 42, "Net Number, NonC2 JU-to-NonC2 JU NPG A": 23, "Active Relay Indicator, Control Channel": false, "Symbol (2525C)": "SFAP----------A", "SupportsPersonnelAmpData": false, "type": "track" }; window.bar = { "Wingman Identification Letter/Number": "A", "Force Tell Indicator": false, "Mission Commander Indicator": false, "Geodetic Position Quality": ">18080 FT", "Latitude": 33.883431850416805, "Air Platform": "CIVIL, AIRLINER", "J-Series": "J2.2", "Active Relay Indicator, Voice Channel": false, "R2 is Held": false, "Speed (Knots)": 477.9369349024706, "Emergency Indicator": false, "SupportsAmpData": false, "Identity": "FRIEND", "Course": 136, "Active Relay Indicator, WAN": false, "Exercise Indicator": false, "Network Participation Status Indicator": "ACTIVE-NON SPECIFIC", "PPLI (Raw)": true, "Is Command Objective": false, "Longitude": -112.52151831505019, "PCT_Identifiers": { "PCT": "P-120895", "PCT L16": "41077" }, "Altitude (M)": 16306.800000000001, "Air Activity": "XRAY", "Environment": "AIR", "Track Number, Mission Commander": "45354", "Record Type": "ReceivedAirPPLIRecord", "Simulation Indicator": true, "Is Connection Target": false, "Airborne Indicator": true, "Time of Reception": "2024-02-20T20:00:04.773561Z", "Speed (M/S)": 245.87199999921322, "Control Channel": 42, "Voice Call Sign Indicator": false, "Data Valid Time (Raw)": 1708459204766, "Flight Leader Indicator": false, "Voice Frequency/Channel": "Channel A 4", "Record Status": "Remote", "Speed (DMH)": 484, "PCT_Display_TN": "41077", "NonC2 JU-to-NonC2 JU NPG Status B": false, "IsEntity": true, "Time of Reception (Raw)": 1708459204773, "Bailout Indicator": false, "NonC2 JU-to-NonC2 JU NPG Status A": false, "RTT Reply Status Indicator": false, "Geometry": { "type": "Point", "coordinates": [ -112.52151831505019, 33.883431850416805, 53500 ] }, "Altitude (Ft)": 53500, "Track Number, Source": "41077", "Command and Control Indicator": false, "Net Number, NonC2 JU-to-NonC2 JU NPG B": 42, "Net Number, NonC2 JU-to-NonC2 JU NPG A": 23, "Active Relay Indicator, Control Channel": false, "Symbol (2525C)": "SFAP----------A", "SupportsPersonnelAmpData": false, "type": "trackkkkkk" };
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:
2 years ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser/OS:
Chrome 121 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
_.isEqual
311225.2 Ops/sec
JSON.stringify
248279.6 Ops/sec
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
I'm ready to answer your questions. Go ahead and ask away!
Related benchmarks:
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings.
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings when comparison is not equal.
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings. Lodash v 4.17.11
Lodash.isEqual vs JSON.stringify Equality Comparison for objects
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings.s
Comments
Confirm delete:
Do you really want to delete benchmark?