Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash & Ramda test the gazlionth
(version: 0)
Comparing performance of:
Ramda vs Lodash non FP vs Lodash FP vs Ecma
Created:
6 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ramda/0.25.0/ramda.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.fp.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js"></script>
Script Preparation code:
var data = _.range(100).map(function(i) { return { counter: i } }); function isOdd(num) { return num % 2 === 1; } function square(num) { return num * num; } function lessThanThreeDigits(num) { return num.toString().length < 3; }
Tests:
Ramda
var result = R.pipe( R.pluck('counter'), R.filter(isOdd), R.map(square), R.filter(lessThanThreeDigits) )(data);
Lodash non FP
var result = _.chain(data) .pick('counter') .filter(isOdd) .map(square) .filter(lessThanThreeDigits) .value();
Lodash FP
var result = _.flow( _.map(_.pick('counter')), _.filter(isOdd), _.map(square), _.filter(lessThanThreeDigits), )(data);
Ecma
var result = data.map((v) => ({ counter: v.counter })) .filter(isOdd) .map(square) .filter(lessThanThreeDigits);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Ramda
Lodash non FP
Lodash FP
Ecma
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Lodash vs Ramda
Lodash vs Ramda (2020-08 edition)
Lodash vs Ramda 2020-09-01
Ramda vs Native .chain
Ramda vs lodash latest
Comments
Confirm delete:
Do you really want to delete benchmark?