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) | 7,520 Ops/sec |
| for-loop and map | 849 Ops/sec |
| Object.fromEntries with spread | 154 Ops/sec |
| for-loop and object (creating temporary objects) | 54 Ops/sec |