Tests:
  • For Loop fill

    AخA
     
    let arrayTest = new Array(10000000);
    for (let i = 0; i < arrayTest.length; i++){
      arrayTest[i] = 0;
    }
  • Array Fill

     
    let arrayTest = new Array(10000000).fill(0);
  • map

     
    Array(10000000).map((_, i) => i);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    For Loop fill
    Array Fill
    map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0
Firefox 99 on Windows
View result in a separate tab
Test name Executions per second
For Loop fill 10.1 Ops/sec
Array Fill 9.8 Ops/sec
map 113.2 Ops/sec