Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
undefined vs typeof vs !!
(version: 0)
Benchmark.js
undefined vs typeof vs !!
Comparing performance of:
strict vs typeof vs !! vs void 0;
Created:
4 years ago
by:
Guest
Go to the latest result
Script Preparation code:
var value;
Tests:
strict
value !== undefined
typeof
typeof value !== "undefined"
!!
!!value
void 0;
value !== void 0;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
strict
typeof
!!
void 0;
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0
Browser/OS:
Chrome 130 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
void 0;
198.1M/s
typeof
192.0M/s
!!
192.0M/s
strict
148.6M/s
View exact numbers
Test name
Executions per second
✓
void 0;
198,056,752 Ops/sec
typeof
191,992,928 Ops/sec
!!
191,977,520 Ops/sec
strict
148,639,696 Ops/sec
Related benchmarks
typeof !== undefined vs strict !equal
typeof number vs not typeof undefined vs undefined
Comments
Confirm delete:
Do you really want to delete benchmark?