Nullish coalescing (??) vs Logical OR (||) vs Nullish coalescing (??) [short-circuit] vs Logical OR (||) [short-circuit] vs JS Compiled ?? (?:) vs JS Compiled ?? (?:) [short-circuit]| Test case name | Result |
|---|---|
| Nullish coalescing (??) | |
| Logical OR (||) | |
| Nullish coalescing (??) [short-circuit] | |
| Logical OR (||) [short-circuit] | |
| JS Compiled ?? (?:) | |
| JS Compiled ?? (?:) [short-circuit] |
| Test name | Executions per second |
|---|---|
| ✓ Nullish coalescing (??) [short-circuit] | 107,816,688 Ops/sec |
| JS Compiled ?? (?:) [short-circuit] | 107,635,392 Ops/sec |
| Logical OR (||) [short-circuit] | 106,414,608 Ops/sec |
| Nullish coalescing (??) | 84,215,360 Ops/sec |
| Logical OR (||) | 83,704,592 Ops/sec |
| JS Compiled ?? (?:) | 76,080,736 Ops/sec |