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:
5 months ago
by:
Guest
Jump 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:
5 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
Test name
Executions per second
typeof
292429.6 Ops/sec
=== null
160820320.0 Ops/sec
Related benchmarks:
Number vs + vs parseFloat
Number vs + vs parseInt
Null check vs typeof
if vs. or
if or math.min
test ternário marco
12123Test
number vs typeof
Math.random vs a+=1
Comments
Confirm delete:
Do you really want to delete benchmark?