Test name | Executions per second |
---|---|
lodash fp | 5263494.0 Ops/sec |
es6 map | 15681969.0 Ops/sec |
<script src="https://cdn.jsdelivr.net/g/lodash@4(lodash.min.js+lodash.fp.min.js)"></script>
function isEven(n) {
return !(n%2);
}
var data = [Array(20)].map((v, idx) => idx);
_.map(isEven, data);
data.map(isEven);