Test case name | Result |
---|---|
Object.entries -> map -> Object.fromEntries | |
Object.entries -> reduce (single object) | |
Object.entries -> map -> reduce (single object) | |
Object.entries -> reduce (temporary objects) | |
Object.entries -> map -> reduce (temporary objects) | |
new map -> loop over object.entries -> Object.fromEntries |
Test name | Executions per second |
---|---|
Object.entries -> map -> Object.fromEntries | 4504.6 Ops/sec |
Object.entries -> reduce (single object) | 22315.7 Ops/sec |
Object.entries -> map -> reduce (single object) | 23553.2 Ops/sec |
Object.entries -> reduce (temporary objects) | 13142.0 Ops/sec |
Object.entries -> map -> reduce (temporary objects) | 12721.8 Ops/sec |
new map -> loop over object.entries -> Object.fromEntries | 3546.5 Ops/sec |