Script Preparation code:
AخA
 
var iterations = 10000;
var arrayTest = new Array(iterations);
Tests:
  • for

     
    for (i = 0; i < iterations; i++) {
      arrayTest[i] = 0
    }
  • fill and foreach

     
    arrayTest.fill(0)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    for
    fill and foreach

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 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
for 15948.9 Ops/sec
fill and foreach 126133.3 Ops/sec