Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36
Chrome 100
Windows
Desktop
2 years ago
Test name Executions per second
Array - instanceof 169372.6 Ops/sec
Array - .prototype.isPrototypeOf 171844.6 Ops/sec
Array - Object.prototype.toString.call 147398.5 Ops/sec
Array - isArray 175231.4 Ops/sec
Array - Symbol.iterator 97335.3 Ops/sec
Function - instanceof 167713.0 Ops/sec
Function - .prototype.isPrototypeOf 172044.9 Ops/sec
Function - Object.prototype.toString.call 144394.8 Ops/sec
Function - typeof 388819.1 Ops/sec
RegExp - instanceof 168252.8 Ops/sec
RegExp - .prototype.isPrototypeOf 169849.9 Ops/sec
RegExp - Object.prototype.toString.call 149610.5 Ops/sec
NodeList - instanceof 166336.7 Ops/sec
NodeList - .prototype.isPrototypeOf 166856.7 Ops/sec
NodeList - Object.prototype.toString.call 148079.8 Ops/sec
jQuery - instanceof 153085.5 Ops/sec
jQuery - .prototype.isPrototypeOf 168284.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Array - instanceof

  • NodeList - Object.prototype.toString.call

  • NodeList - .prototype.isPrototypeOf

  • NodeList - instanceof

  • RegExp - Object.prototype.toString.call

  • RegExp - .prototype.isPrototypeOf

  • RegExp - instanceof

  • jQuery - instanceof

  • Function - typeof

  • Function - .prototype.isPrototypeOf

  • Function - instanceof

  • Array - Symbol.iterator

  • Array - isArray

  • Array - Object.prototype.toString.call

  • Array - .prototype.isPrototypeOf

  • Function - Object.prototype.toString.call

  • jQuery - .prototype.isPrototypeOf