Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
if undefined comparison with binary
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 OPR/109.0.0.0
Browser:
Opera 109
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
case 1
49137112.0 Ops/sec
case 2
52077936.0 Ops/sec
case 3
4462695.0 Ops/sec
case 4
50719752.0 Ops/sec
case 5
51761800.0 Ops/sec
Tests:
case 1
const obj = { 2: true, 7: true } if (obj[3]) { } obj[3] = true;
case 2
const obj = { 2: true, 7: true } if (typeof obj[3] !== 'undefined') { } obj[3] = true;
case 3
const obj = { 2: true, 7: true } if (obj[3] !== undefined) { } obj[3] = true;
case 4
const obj = { 2: 1, 7: 1 } if (obj[3] !== 1) { } obj[3] = 1;
case 5
const obj = { 2: 1, 7: 1 } if (obj[3]) { } obj[3] = 1;