Object.Assign() vs For-In Loop vs Object.Entries() with For-Each Loop vs Object.Keys() with For-Each Loop vs Spread| Test case name | Result |
|---|---|
| Object.Assign() | |
| For-In Loop | |
| Object.Entries() with For-Each Loop | |
| Object.Keys() with For-Each Loop | |
| Spread |
| Test name | Executions per second |
|---|---|
| ✓ Object.Keys() with For-Each Loop | 7,718 Ops/sec |
| For-In Loop | 5,936 Ops/sec |
| Object.Entries() with For-Each Loop | 3,291 Ops/sec |
| Object.Assign() | 1,185 Ops/sec |
| Spread | 1,108 Ops/sec |