Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
typeof !== undefined vs truthy
(version: 1)
Comparing performance of:
typeof !== undefined vs truthy
Created:
3 months ago
by:
Guest
Go to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
const a = 'foo'
Tests:
typeof !== undefined
typeof a !== 'undefined' ? true : false
truthy
a ? true : false
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
typeof !== undefined
truthy
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
3 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Browser/OS:
Chrome 147 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
truthy
219.4M/s
typeof !== undefined
215.6M/s
View exact numbers
Test name
Executions per second
✓
truthy
219,405,216 Ops/sec
typeof !== undefined
215,579,584 Ops/sec
Related benchmarks
Typeof x === 'undefined' vs x === undefined (test without syntax error)
undefined tests
Comments
Confirm delete:
Do you really want to delete benchmark?