Test case name | Result |
---|---|
Array.map with Object.fromEntries | |
Array.map with new Map | |
Reduce with new Object (`{}`) (reusing object) | |
Reduce with new Object (`{}`) (creating temporary objects) | |
Reduce with new Map (reusing map) |
Test name | Executions per second |
---|---|
Array.map with Object.fromEntries | 3553.8 Ops/sec |
Array.map with new Map | 1170.9 Ops/sec |
Reduce with new Object (`{}`) (reusing object) | 6117.0 Ops/sec |
Reduce with new Object (`{}`) (creating temporary objects) | 0.3 Ops/sec |
Reduce with new Map (reusing map) | 1350.2 Ops/sec |