Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Nullish coalescing V.S. Logic or operator (native)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Browser:
Chrome 114
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
Nullish coalescing
4K/s
Logic or operator
4K/s
View exact numbers
Test name
Executions per second
✓
Nullish coalescing
4,331 Ops/sec
Logic or operator
4,287 Ops/sec
Tests:
Nullish coalescing
let v = null for (let i = 1; i < 1e6; i++) v = v ?? null
Logic or operator
let v = null for (let i = 1; i < 1e6; i++) v = v || null