Script Preparation code:
Tests:

Historical Performance Data aggregated from 18 community runs

Desktop Results:
Firefox 9 runs
for-index
765/s
for-of
143/s

Fastest: for-index (5.3x faster)

View exact numbers
  • for-index: 765 ops/sec
  • for-of: 143 ops/sec
Chrome 9 runs
for-index
302/s
for-of
173/s

Fastest: for-index (1.7x faster)

View exact numbers
  • for-index: 302 ops/sec
  • for-of: 173 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-of
    for-index

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36 Edg/149.0.0.0
Chrome 149 on Windows
View result in a separate tab
for-of
505/s
for-index
299/s
View exact numbers
Test name Executions per second
for-of 505 Ops/sec
for-index 299 Ops/sec