Test name | Executions per second |
---|---|
Lodash FP | 249782.5 Ops/sec |
Native | 1728565.4 Ops/sec |
Lodash Regular | 1802048.2 Ops/sec |
<script src='https://cdn.jsdelivr.net/lodash/4.17.4/lodash.fp.min.js'></script>
var fp = _.noConflict();
var array = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
var reducer = (r, x) => r + x
fp.reduce(reducer, '')(array)
array.reduce(reducer, '')
_.reduce(array, reducer, '');