HTML Preparation code:
AخA
 
1
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.js"></script>
Script Preparation code:
 
var data = [1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,1,2,3,4,5,6,7,8,];
Tests:
  • Array.prototype.map

     
    data.map(function (number) { return number * 2});
  • Lodash.map

     
    _.map(data, function (number) { return number * 2});
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Array.prototype.map
    Lodash.map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 13 hours ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134 on Windows
View result in a separate tab
Test name Executions per second
Array.prototype.map 8187525.5 Ops/sec
Lodash.map 22138302.0 Ops/sec