Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Windows
Desktop
2 years ago
Benchmark.js
Array.isArray
25.4M/s
Object.prototype.toString
12.9M/s
[].constructor
9.9M/s
instanceof
9.9M/s
View exact numbers
Test name Executions per second
Array.isArray 25,427,890 Ops/sec
Object.prototype.toString 12,929,773 Ops/sec
[].constructor 9,930,422 Ops/sec
instanceof 9,863,478 Ops/sec
Script Preparation code:
Tests: