for-in vs Object.keysFastest: for-in (1.2x faster)
28 ops/sec
23 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| for-in | |
| Object.keys |
| Test name | Executions per second |
|---|---|
| ✓ for-in | 24 Ops/sec |
| Object.keys | 23 Ops/sec |