Test case name | Result |
---|---|
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 |
Test name | Executions per second |
---|---|
Array - instanceof | 276373.4 Ops/sec |
Array - .prototype.isPrototypeOf | 285093.8 Ops/sec |
Array - Object.prototype.toString.call | 239595.4 Ops/sec |
Array - isArray | 294664.6 Ops/sec |
Array - Symbol.iterator | 175787.3 Ops/sec |
Function - instanceof | 283849.3 Ops/sec |
Function - .prototype.isPrototypeOf | 283560.4 Ops/sec |
Function - Object.prototype.toString.call | 229560.2 Ops/sec |
Function - typeof | 825733.6 Ops/sec |
RegExp - instanceof | 286185.5 Ops/sec |
RegExp - .prototype.isPrototypeOf | 281776.4 Ops/sec |
RegExp - Object.prototype.toString.call | 243844.5 Ops/sec |
NodeList - instanceof | 279647.5 Ops/sec |
NodeList - .prototype.isPrototypeOf | 283888.3 Ops/sec |
NodeList - Object.prototype.toString.call | 228895.3 Ops/sec |
jQuery - instanceof | 252771.7 Ops/sec |
jQuery - .prototype.isPrototypeOf | 274424.0 Ops/sec |