Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash.isEqual vs JSON.stringify Equality Comparison for Shallow Array of Strings. kap
Test on isEqual performance
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
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:
Chrome 121
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
_.isEqual
311225.2 Ops/sec
JSON.stringify
248279.6 Ops/sec
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);