Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Nullish coalescing (??) vs logical OR (||)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/132.0.6834.78 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 132
Operating system:
iOS 18.1.1
Device Platform:
Mobile
Date tested:
one year ago
Logical OR (||)
276.4M/s
Nullish coalescing (??)
251.0M/s
Nullish coalescing (??) [short-circuit]
243.2M/s
Logical OR (||) [short-circuit]
243.1M/s
View exact numbers
Test name
Executions per second
✓
Logical OR (||)
276,435,040 Ops/sec
Nullish coalescing (??)
251,031,680 Ops/sec
Nullish coalescing (??) [short-circuit]
243,225,264 Ops/sec
Logical OR (||) [short-circuit]
243,141,776 Ops/sec
Tests:
Nullish coalescing (??)
let x = null ?? undefined ?? null ?? undefined ?? null ?? undefined ?? null ?? undefined ?? null ?? undefined ?? 1;
Logical OR (||)
let x = null || undefined || null || undefined || null || undefined || null || undefined || null || undefined || 1;
Nullish coalescing (??) [short-circuit]
let x = 1 ?? undefined ?? null ?? undefined ?? null ?? undefined ?? null ?? undefined ?? null ?? undefined ?? 1;
Logical OR (||) [short-circuit]
let x = 1 || undefined || null || undefined || null || undefined || null || undefined || null || undefined || 1;