Script Preparation code:
AخA
 
var array = new Array(100);
Tests:
  • for

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

     
    array.forEach(function(item, index) {
      return item;
    });
  • some

     
    array.some(function(item, index) {
      return item === array[index];
    });
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    for
    foreach
    some

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121 on Windows
View result in a separate tab
Test name Executions per second
for 209556.6 Ops/sec
foreach 11304574.0 Ops/sec
some 11436338.0 Ops/sec