Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash partition vs ES6 (KAP
Comparison of using lodash partition against raw ES6
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Browser:
Chrome 121
Operating system:
Windows
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
_.partition
344529.8 Ops/sec
ES6 partition
171132.1 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var arr = [ [ "Wingman Identification Letter/Number", "A" ], [ "Force Tell Indicator", false ], [ "Mission Commander Indicator", false ], [ "Geodetic Position Quality", ">18080 FT" ], [ "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 ], [ "Identity", "FRIEND" ], [ "Course", 139 ], [ "Active Relay Indicator, WAN", false ], [ "Exercise Indicator", false ], [ "Network Participation Status Indicator", "ACTIVE-NON SPECIFIC" ], [ "Is Command Objective", false ], [ "PCT_Identifiers", { "PCT": "P-68383", "PCT L16": "43756" } ], [ "Altitude (M)", 14417.04 ], [ "Air Activity", "XRAY" ], [ "Environment", "AIR" ], [ "Track Number, Mission Commander", "45354" ], [ "Simulation Indicator", true ], [ "Is Connection Target", false ], [ "Airborne Indicator", true ], [ "Time of Reception", "2024-02-19T14:21:26.903866Z" ], [ "Speed (M/S)", 245.87199999921322 ], [ "Control Channel", 42 ], [ "Voice Call Sign Indicator", false ], [ "Flight Leader Indicator", false ], [ "Voice Frequency/Channel", "Channel A 4" ], [ "Record Status", "Remote" ], [ "Speed (DMH)", 484 ], [ "PCT_Display_TN", "43756" ], [ "NonC2 JU-to-NonC2 JU NPG Status B", false ], [ "IsEntity", true ], [ "Bailout Indicator", false ], [ "NonC2 JU-to-NonC2 JU NPG Status A", false ], [ "RTT Reply Status Indicator", false ], [ "Altitude (Ft)", 47300 ], [ "Track Number, Source", "43756" ], [ "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 ] ]
Tests:
_.partition
_.partition(arr, (attr) => _.isBoolean(attr[1]));
ES6 partition
const partition = (arr, predicate) => { return [ ...arr.filter(predicate), ...arr.filter(el => !predicate(el)) ] }; partition(arr, (attr) => _.isBoolean(attr[1]));