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:
5 months ago
Test name
Executions per second
Array.isArray
77361288.0 Ops/sec
instanceof
56877452.0 Ops/sec
constructor
72748280.0 Ops/sec
Object.getPrototypeOf
31052944.0 Ops/sec
Object.prototype.toString
36580664.0 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]"