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 6561377.0 Ops/sec
instanceof 2230753.0 Ops/sec
[].constructor 2243595.8 Ops/sec
Object.prototype.toString 2910358.0 Ops/sec
[].constructor.name 5061853.5 Ops/sec
Script Preparation code:
Tests:
  • Array.isArray

  • instanceof

  • [].constructor

  • Object.prototype.toString

  • [].constructor.name