Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array isArray vs typeof
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:134.0) Gecko/20100101 Firefox/134.0
Browser:
Firefox 134
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
typeof
273.3M/s
isArray
165.2M/s
View exact numbers
Test name
Executions per second
✓
typeof
273,321,664 Ops/sec
isArray
165,210,144 Ops/sec
Script Preparation code:
var test = [1,2,3,4]; var c;
Tests:
typeof
if (typeof test === 'object') { c++; }
isArray
if (Array.isArray(test)) { c++; }