Script Preparation code:
Tests:

Historical Performance Data aggregated from 5 community runs

Desktop Results:
Chrome 5 runs
flatMap
3K/s
map
3K/s
View exact numbers
  • flatMap: 3,395 ops/sec
  • map: 3,345 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
    reduce
    flatMap
    map
    foreach
    for of

    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/134.0.0.0 Safari/537.36 Edg/134.0.0.0
Chrome 134 on Windows
View result in a separate tab
for of
28K/s
foreach
26K/s
reduce
26K/s
map
11K/s
flatMap
10K/s
View exact numbers
Test name Executions per second
for of 27,676 Ops/sec
foreach 26,272 Ops/sec
reduce 26,163 Ops/sec
map 10,777 Ops/sec
flatMap 10,371 Ops/sec