Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Windows
Desktop
2 years ago
Benchmark.js
Array.isArray
17.1M/s
Object.prototype.toString
8.4M/s
[].constructor
6.8M/s
instanceof
6.7M/s
View exact numbers
Test name Executions per second
Array.isArray 17,099,056 Ops/sec
Object.prototype.toString 8,386,744 Ops/sec
[].constructor 6,826,510 Ops/sec
instanceof 6,718,026 Ops/sec
Script Preparation code:
Tests: