Test name | Executions per second |
---|---|
lodash.each | 11829.7 Ops/sec |
native forEach | 208302.1 Ops/sec |
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js'></script>
var obj = Array.from({ length: 10000 }).map((value, i) => i);
_.each(obj, function(v) {})
obj.forEach(function(v) {})