Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Map (Lodash vs Lodash/fp vs Immutable)
(version: 0)
Comparing performance of:
Array.prototype.map vs lodash.map vs Immutable.map vs lodash/fp.map
Created:
2 years ago
by:
Guest
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 type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/immutable/3.8.2/immutable.min.js'></script>
Script Preparation code:
var fp = _.noConflict(); function double(n) { return n*2; } var data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30];
Tests:
Array.prototype.map
data.map(double);
lodash.map
_.map(data, double);
Immutable.map
Immutable.fromJS(data).map(double)
lodash/fp.map
fp.map(double)(data)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Array.prototype.map
lodash.map
Immutable.map
lodash/fp.map
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser/OS:
Chrome 135 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array.prototype.map
8905799.0 Ops/sec
lodash.map
21854888.0 Ops/sec
Immutable.map
930060.2 Ops/sec
lodash/fp.map
798742.0 Ops/sec
Related benchmarks:
Map (Native vs Ramda vs Lodash vs Lodash/fp vs Immutable)
Map (Native vs Ramda vs Lodash vs Immutable
Map (Native vs Ramda vs Lodash FP vs Immutable)
Map (Lodash vs Lodash/fp vs Immutable) new versions
Comments
Confirm delete:
Do you really want to delete benchmark?