Script Preparation code:
Tests:

Historical Performance Data aggregated from 7 community runs

Desktop Results:
Chrome 7 runs
filter().map()
1K/s
flatMap()
848/s

Fastest: filter().map() (1.4x faster)

View exact numbers
  • filter().map(): 1,164 ops/sec
  • flatMap(): 848 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
    filter().map()
    flatMap()

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 28 days ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.5 Mobile/15E148 Safari/604.1
Mobile Safari 26 on iOS 18.7
View result in a separate tab
flatMap()
2K/s
filter().map()
2K/s
View exact numbers
Test name Executions per second
flatMap() 2,289 Ops/sec
filter().map() 1,775 Ops/sec