Test name | Executions per second |
---|---|
native | 368746.8 Ops/sec |
lodash | 57971.6 Ops/sec |
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js"></script>
var arr = [];
for (var i = 0; i < 1000; i++) {
arr[i] = i;
}
arr.forEach((a)=>{a * 2 * 5;} )
_.forEach(arr,(a)=>{a * 2 * 5;})