Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
for .. of
2.0M/s
forEach
1.6M/s

Fastest: for .. of (1.3x faster)

View exact numbers
  • for .. of: 2,038,044 ops/sec
  • forEach: 1,603,154 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
    forEach

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 7 months ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0
Chrome 143 on Mac OS X 10.15.7
View result in a separate tab
for .. of
3.7M/s
forEach
3.7M/s
View exact numbers
Test name Executions per second
for .. of 3,675,988 Ops/sec
forEach 3,656,322 Ops/sec