filter().map() vs flatMap() vs reduce()Fastest: filter().map() (2.8x faster)
24,502 ops/sec
15,166 ops/sec
8,671 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() | |
| reduce() |
| Test name | Executions per second |
|---|---|
| ✓ reduce() | 8,874 Ops/sec |
| filter().map() | 5,708 Ops/sec |
| flatMap() | 4,180 Ops/sec |