Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
forEach
1.5M/s
map
1.3M/s

Fastest: forEach (1.2x faster)

View exact numbers
  • forEach: 1,493,999 ops/sec
  • map: 1,276,852 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
    map
    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_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Mac OS X 10.15.7
View result in a separate tab
forEach
23.0M/s
map
17.0M/s
View exact numbers
Test name Executions per second
forEach 22,954,522 Ops/sec
map 17,035,556 Ops/sec