Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
void 0 and undefined in deep call stack - 4
Check performance degradation due to scope chain when undefined is called from deep stack
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Browser:
Chrome 120
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
compare window.undefined and void 0
1869651.0 Ops/sec
compare window.undefined and window.undefined
19023.5 Ops/sec
Tests:
compare window.undefined and void 0
function compare(n= 1e3){ let a = undefined; for(let i = 0; i < n; i++){ a === void 0; } } function deep(num){ if (num === 0) { compare(); return; } else { deep(num-1); } } deep(1);
compare window.undefined and window.undefined
function compare(n= 1e3){ let a = undefined; for(let i = 0; i < n; i++){ a === undefined; } } function deep(num){ if (num === 0) { compare(); return; } else { deep(num-1); } } deep(1);