filter().map() vs flatMap()Fastest: filter().map() (1.4x faster)
1,164 ops/sec
848 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| filter().map() | |
| flatMap() |
| Test name | Executions per second |
|---|---|
| ✓ flatMap() | 2,289 Ops/sec |
| filter().map() | 1,775 Ops/sec |