Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
instanceof vs typeof
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
typeof
2296.9M/s
typeof no function
1535.2M/s
typeof and test attribute
1526.8M/s
instanceof
224.4M/s
View exact numbers
Test name
Executions per second
✓
typeof
2,296,851,200 Ops/sec
typeof no function
1,535,207,424 Ops/sec
typeof and test attribute
1,526,837,632 Ops/sec
instanceof
224,361,072 Ops/sec
Script Preparation code:
var obj = {a:2};
Tests:
instanceof
obj instanceof Object
typeof
typeof obj === 'object'
typeof no function
typeof obj === 'object' && typeof obj !== 'function'
typeof and test attribute
typeof obj === 'object' && obj.a