Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Nullish coalescing, logical OR
(version: 0)
Comparing performance of:
Nullish coalescing (??) vs Logical OR (||) vs Nullish coalescing (??) [short-circuit] vs Logical OR (||) [short-circuit]
Created:
3 years ago
by:
Guest
Jump to the latest result
Tests:
Nullish coalescing (??)
let x = undefined ?? 1;
Logical OR (||)
let x = undefined || 1;
Nullish coalescing (??) [short-circuit]
let x = 1 ?? undefined;
Logical OR (||) [short-circuit]
let x = 1 || undefined;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Nullish coalescing (??)
Logical OR (||)
Nullish coalescing (??) [short-circuit]
Logical OR (||) [short-circuit]
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Nullish coalescing vs logical OR operators
Nullish coalescing V.S. Logic or operator (native)
Testing for false vs undefined vs == null vs hasOwnProperty vs hasOwn for undefined member
Nullish coalescing vs if-chains
Comments
Confirm delete:
Do you really want to delete benchmark?