Script Preparation code:
Tests:

Historical Performance Data aggregated from 11 community runs

Desktop Results:
Chrome 11 runs
map().flat()
313/s
flatMap()
281/s

Fastest: map().flat() (1.1x faster)

View exact numbers
  • map().flat(): 313 ops/sec
  • flatMap(): 281 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().flat()
    flatMap()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 22 days ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36 Edg/147.0.0.0
Chrome 147 on Windows
View result in a separate tab
map().flat()
140/s
flatMap()
128/s
View exact numbers
Test name Executions per second
map().flat() 140 Ops/sec
flatMap() 128 Ops/sec