Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
typeof vs ===null
(version: 1)
Comparing performance of:
typeof vs === null
Created:
8 months ago
by:
Guest
Go to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
var valueToCheck = Math.random() > 0.5 ? 12 : null;
Tests:
typeof
console.log(typeof (Math.random() > 0.5 ? 12 : null) === 'object');
=== null
(Math.random() > 0.5 ? 12 : null) === null;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
typeof
=== null
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
8 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:145.0) Gecko/20100101 Firefox/145.0
Browser/OS:
Firefox 145 on Mac OS X 10.15
View result in a separate tab
Embed
Embed Benchmark Result
=== null
160.8M/s
typeof
292K/s
View exact numbers
Test name
Executions per second
✓
=== null
160,820,320 Ops/sec
typeof
292,430 Ops/sec
Related benchmarks
Number vs + vs parseFloat
Number vs + vs parseInt
number vs typeof
Math.random vs a+=1
Comments
Confirm delete:
Do you really want to delete benchmark?