HTML Preparation code:
x
 
1
2
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
 
var size = 10000;
Tests:
  • lodash range

     
    _.range(size);
  • array from

     
    Array.from({length: size}, (_, i) => i);
  • keys spread

     
    [...Array(size).keys()]
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    lodash range
    array from
    keys spread

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132 on Windows
View result in a separate tab
Test name Executions per second
lodash range 21825.4 Ops/sec
array from 9751.8 Ops/sec
keys spread 10099.7 Ops/sec