Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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:
one year ago
Benchmark engine:
Benchmark.js
Strict void 0
430.8M/s
Strict undefined
420.8M/s
Negation
207.4M/s
View exact numbers
Test name
Executions per second
✓
Strict void 0
430,807,040 Ops/sec
Strict undefined
420,803,520 Ops/sec
Negation
207,358,864 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); }