Object.fromEntries vs Reduce (reuse object) vs Reduce (creating temporary objects)Fastest: Reduce (reuse object) (29.3x faster)
2,724 ops/sec
298 ops/sec
93 ops/sec
Fastest: Reduce (reuse object) (5091.5x faster)
1,870 ops/sec
345 ops/sec
0 ops/sec
Fastest: Reduce (reuse object) (2899.3x faster)
601 ops/sec
346 ops/sec
0 ops/sec
Fastest: Reduce (reuse object) (32.6x faster)
2,399 ops/sec
270 ops/sec
74 ops/sec
Fastest: Reduce (reuse object) (50.5x faster)
856 ops/sec
179 ops/sec
17 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| Object.fromEntries | |
| Reduce (reuse object) | |
| Reduce (creating temporary objects) |
| Test name | Executions per second |
|---|---|
| ✓ Reduce (reuse object) | 3,457 Ops/sec |
| Object.fromEntries | 485 Ops/sec |
| Reduce (creating temporary objects) | 161 Ops/sec |