Reduce (reuse object) vs Reduce (creating temporary objects) vs MapFastest: Reduce (reuse object) (39.8x faster)
2,311 ops/sec
1,011 ops/sec
58 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) | 961 Ops/sec |
| Map | 845 Ops/sec |
| Reduce (creating temporary objects) | 0 Ops/sec |