Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
isArray?
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray#instanceof_vs._array.isarray
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Mobile Safari/537.36 EdgA/142.0.0.0
Browser:
Chrome Mobile 142
Operating system:
Android
Device Platform:
Mobile
Date tested:
8 months ago
Array.isArray
77.4M/s
constructor
72.7M/s
instanceof
56.9M/s
Object.prototype.toString
36.6M/s
Object.getPrototypeOf
31.1M/s
View exact numbers
Test name
Executions per second
✓
Array.isArray
77,361,288 Ops/sec
constructor
72,748,280 Ops/sec
instanceof
56,877,452 Ops/sec
Object.prototype.toString
36,580,664 Ops/sec
Object.getPrototypeOf
31,052,944 Ops/sec
Tests:
Array.isArray
Array.isArray([])
instanceof
[] instanceof Array
constructor
[].constructor === Array
Object.getPrototypeOf
Object.getPrototypeOf([]) === Array.prototype
Object.prototype.toString
Object.prototype.toString.call([]) === "[object Array]"