Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Chrome 63
Mac OS X 10.12.5
Other
2025 years ago
Test name Executions per second
lodash.map 67626.6 Ops/sec
native 284573.5 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/lodash/4.17.4/lodash.min.js"></script>
Script Preparation code:
 
var value = [];
for(var i = 0; i < 1000; i++){
  value[i] = i;
}
Tests:
  • lodash.map

     
    _.map(value, (x) => x*x);
  • native

     
    value.map((x) => x*x);