Script Preparation code:
Tests:

Historical Performance Data aggregated from 24 community runs

Desktop Results:
Chrome 24 runs
forEach
8.0M/s
map
6.1M/s

Fastest: forEach (1.3x faster)

View exact numbers
  • forEach: 8,005,610 ops/sec
  • map: 6,122,824 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
    forEach
    map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Windows
View result in a separate tab
forEach
10.1M/s
map
7.3M/s
View exact numbers
Test name Executions per second
forEach 10,068,235 Ops/sec
map 7,250,748 Ops/sec