Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
isarray_vs_instanceof_vs_tostring
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 OPR/114.0.0.0
Browser:
Opera 114
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
isArray
7.3M/s
instanceof
7.0M/s
toString
6.4M/s
View exact numbers
Test name
Executions per second
✓
isArray
7,312,500 Ops/sec
instanceof
7,047,356 Ops/sec
toString
6,375,773 Ops/sec
Tests:
isArray
const i = Array.isArray([]);
instanceof
const i = [] instanceof Array;
toString
const i = Object.prototype.toString.call([]) === '[object Array]';