Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36
Chrome 87
Mac OS X 10.11.6
Desktop
4 years ago
Test name Executions per second
Array.isArray 6471757.5 Ops/sec
instanceof 2212125.2 Ops/sec
[].constructor 2279722.5 Ops/sec
Object.prototype.toString 2915189.0 Ops/sec
Script Preparation code:
Tests:
  • Array.isArray

  • instanceof

  • [].constructor

  • Object.prototype.toString