Test name | Executions per second |
---|---|
lodash.map | 486161.0 Ops/sec |
native | 336993.3 Ops/sec |
<script src="https://cdn.jsdelivr.net/lodash/4.17.4/lodash.min.js"></script>
var value = [];
for(var i = 0; i < 1000; i++){
value[i] = i;
}
_.map(value, (x) => x*x);
value.map((x) => x*x);