null vs undefined vs Object.create(null) vs void 0Fastest: void 0 (246.3x faster)
2,907,238 ops/sec
2,887,530 ops/sec
13,075 ops/sec
11,806 ops/sec
Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.
| Test case name | Result |
|---|---|
| null | |
| undefined | |
| Object.create(null) | |
| void 0 |
| Test name | Executions per second |
|---|---|
| ✓ void 0 | 3,472,582 Ops/sec |
| null | 3,435,816 Ops/sec |
| undefined | 1,468,492 Ops/sec |
| Object.create(null) | 70,981 Ops/sec |