Reduce (reuse object) vs Reduce (creating temporary objects) vs MapFastest: Reduce (reuse object) (25.5x faster)
2,351 ops/sec
1,011 ops/sec
92 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Reduce (reuse object) | |
| Reduce (creating temporary objects) | |
| Map |
| Test name | Executions per second |
|---|---|
| ✓ Reduce (reuse object) | 2,351 Ops/sec |
| Map | 902 Ops/sec |
| Reduce (creating temporary objects) | 92 Ops/sec |