Test name | Executions per second |
---|---|
lodash | 7.0 Ops/sec |
native | 5.8 Ops/sec |
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
var data = Array(1000000).fill({ a: 'a', b: 1 });
_.chain(data).map(x => `${x.a}_${x.b}`).join(',').value()
data.map(x => `${x.a}_${x.b}`).join(',')