Script Preparation code:
AخA
 
var array = new Array(65535).fill(0);
var q = 0;
Tests:
  • for i

     
    for (var i = 0; i < array.length; i++) {
      q = array[i];
    }
  • for..of

     
    for (var i of array) {
      q = i;
    }
  • foreach

     
    array.forEach((i) => q = i);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    for i
    for..of
    foreach

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
for i 182.7 Ops/sec
for..of 475.9 Ops/sec
foreach 477.4 Ops/sec