Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0
Chrome 128
Windows
Desktop
2 years ago
Benchmark.js
Array.isArray
14.4M/s
Object.prototype.toString
7.5M/s
instanceof
5.9M/s
[].constructor
5.9M/s
View exact numbers
Test name Executions per second
Array.isArray 14,445,603 Ops/sec
Object.prototype.toString 7,450,324 Ops/sec
instanceof 5,927,956 Ops/sec
[].constructor 5,914,050 Ops/sec
Script Preparation code:
Tests: