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:136.0) Gecko/20100101 Firefox/136.0
Browser:
Firefox 136
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one year ago
typeof
277.5M/s
isArray
162.1M/s
View exact numbers
Test name
Executions per second
✓
typeof
277,502,400 Ops/sec
isArray
162,129,168 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++; }