Script Preparation code:
Tests:

Historical Performance Data aggregated from 8 community runs

Desktop Results:
Chrome 8 runs
foreach
4.9M/s
some
4.8M/s
for
4.0M/s
for..of
930K/s

Fastest: foreach (5.3x faster)

View exact numbers
  • foreach: 4,888,674 ops/sec
  • some: 4,816,697 ops/sec
  • for: 4,029,776 ops/sec
  • for..of: 930,170 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 8 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0
Firefox 145 on Mac OS X 10.15
View result in a separate tab
for
37.8M/s
foreach
6.3M/s
some
4.0M/s
for..of
445K/s
View exact numbers
Test name Executions per second
for 37,836,912 Ops/sec
foreach 6,275,898 Ops/sec
some 4,021,980 Ops/sec
for..of 445,105 Ops/sec