Object.fromEntries with spread vs for-loop and object (reuse object) vs for-loop and object (creating temporary objects) vs for-loop and map| Test case name | Result |
|---|---|
| Object.fromEntries with spread | |
| for-loop and object (reuse object) | |
| for-loop and object (creating temporary objects) | |
| for-loop and map |
| Test name | Executions per second |
|---|---|
| ✓ for-loop and object (reuse object) | 11,160 Ops/sec |
| Object.fromEntries with spread | 1,666 Ops/sec |
| for-loop and map | 1,114 Ops/sec |
| for-loop and object (creating temporary objects) | 74 Ops/sec |