Script Preparation code:
Tests:

Historical Performance Data aggregated from 18 community runs

Desktop Results:
Chrome 18 runs
foreach
763K/s
for..of
520K/s

Fastest: foreach (1.5x faster)

View exact numbers
  • foreach: 762,760 ops/sec
  • for..of: 520,140 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
    foreach
    for..of

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Chrome 148 on Linux
View result in a separate tab
foreach
1.0M/s
for..of
482K/s
View exact numbers
Test name Executions per second
foreach 1,043,118 Ops/sec
for..of 482,142 Ops/sec