for-in vs Object.keysFastest: for-in (1.2x faster)
7 ops/sec
6 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 | 1 Ops/sec |
| Object.keys | 1 Ops/sec |