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(i) {
      array[i];
    });
  • some

     
    array.some(function(i) {
      array[i];
    });
  • for..of

     
    for (var i of array) {
      array[i];
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 12 hours ago)
Mozilla/5.0 (X11; Linux x86_64; rv:137.0) Gecko/20100101 Firefox/137.0
Firefox 137 on Linux
View result in a separate tab
Test name Executions per second
for 20330088.0 Ops/sec
foreach 7087219.0 Ops/sec
some 5509015.5 Ops/sec
for..of 1276732.6 Ops/sec