Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
for .. of
319K/s
forEach
100K/s

Fastest: for .. of (3.2x faster)

View exact numbers
  • for .. of: 318,762 ops/sec
  • forEach: 100,233 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: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:139.0) Gecko/20100101 Firefox/139.0
Firefox 139 on Mac OS X 10.15
View result in a separate tab
forEach
1.9M/s
for .. of
360K/s
View exact numbers
Test name Executions per second
forEach 1,870,479 Ops/sec
for .. of 359,934 Ops/sec