Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Negation vs strict undefined
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.6 Safari/605.1.15
Browser:
Safari 18
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
9 months ago
Test name
Executions per second
Negation
207358864.0 Ops/sec
Strict undefined
420803520.0 Ops/sec
Strict void 0
430807040.0 Ops/sec
Script Preparation code:
var map = new Map(); map.set('x', 1); map.set('y', 2);
Tests:
Negation
const z = map.get('z'); if (!z) { map.set('z', 3); }
Strict undefined
const z = map.get('z'); if (z === undefined) { map.set('z', 3); }
Strict void 0
const z = map.get('z'); if (z === void 0) { map.set('z', 3); }