Script Preparation code:
Tests:

Historical Performance Data aggregated from 11 community runs

Desktop Results:
Chrome 6 runs
for ... of
4.1M/s
forEach
3.4M/s
map
3.4M/s
for
998K/s

Fastest: for ... of (4.1x faster)

View exact numbers
  • for ... of: 4,072,042 ops/sec
  • forEach: 3,407,785 ops/sec
  • map: 3,402,606 ops/sec
  • for: 997,662 ops/sec
Firefox 5 runs
for
3.3M/s
map
2.8M/s
forEach
1.8M/s
for ... of
1.2M/s

Fastest: for (2.8x faster)

View exact numbers
  • for: 3,331,213 ops/sec
  • map: 2,815,716 ops/sec
  • forEach: 1,781,016 ops/sec
  • for ... of: 1,211,095 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
    for ... of
    forEach
    map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 months ago)
Mozilla/5.0 (X11; Linux x86_64; rv:147.0) Gecko/20100101 Firefox/147.0
Firefox 147 on Linux
View result in a separate tab
for
2.2M/s
forEach
1.8M/s
map
1.7M/s
for ... of
999K/s
View exact numbers
Test name Executions per second
for 2,224,218 Ops/sec
forEach 1,781,016 Ops/sec
map 1,731,814 Ops/sec
for ... of 998,807 Ops/sec