Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Chrome 121
Windows
Desktop
2 years ago
Benchmark.js
Array.isArray
22.0M/s
Object.prototype.toString
9.9M/s
[].constructor
8.3M/s
instanceof
7.8M/s
View exact numbers
Test name Executions per second
Array.isArray 21,993,132 Ops/sec
Object.prototype.toString 9,862,546 Ops/sec
[].constructor 8,309,509 Ops/sec
instanceof 7,803,136 Ops/sec
Script Preparation code:
Tests: