Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash vs Lodash FP (filter, range, add, isEven, reduce) v4
(version: 3)
Comparing performance of:
Lodash vs Lodash FP vs Lodash (simpler) vs Lodash FP (simpler)
Created:
7 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<script src='https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.js)'></script>
Script Preparation code:
var fp = _.noConflict(); var pred = x => x % 2;
Tests:
Lodash
_.reduce( _.filter(_.range(1000), pred), _.add, 0 )
Lodash FP
fp.reduce( fp.add, 0, fp.filter(pred, fp.range(1000)) )
Lodash (simpler)
_.filter(_.range(10000), pred)
Lodash FP (simpler)
fp.filter(pred, fp.range(10000))
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Lodash
Lodash FP
Lodash (simpler)
Lodash FP (simpler)
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 years ago
)
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36
Browser/OS:
Chrome Mobile 120 on Android
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Lodash
54972.8 Ops/sec
Lodash FP
354110.1 Ops/sec
Lodash (simpler)
5943.8 Ops/sec
Lodash FP (simpler)
420384.6 Ops/sec
Related benchmarks:
Lodash Chain vs Native (with &&) vs Native (without &&) vs Flow
lodash isNil vs ! Operator
Lodash Chain (with &&) vs Native (with &&) vs Native (without &&) vs Flow
Lodash Chain vs Native (with &&) vs Native (without &&) vs Flow, with actual filtering
Comments
Confirm delete:
Do you really want to delete benchmark?