lodash/fp vs Immutable.js (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src='https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.js)'></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/3.8.1/immutable.min.js"></script>

Setup

xs = _.range(-500000, 500000)

Test runner

Ready to run.

Testing in
TestOps/sec
lodash/fp
_.pipe(
  _.map(x => x * 2),
  _.filter(x => x > 0),
  _.reduce((r, x) => r + x, 0)
)(xs)
ready
Immutable.js
Immutable.Seq(xs)
  .map(x => x * 2)
  .filter(x => x > 0)
  .reduce((r, x) => r + x, 0)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.