tagName vs instanceof

4 months ago
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0
Test name Executions per second
instanceof 13722530.0 Ops/sec
tagName 10192670.0 Ops/sec
nodeName 9880119.0 Ops/sec
localName 9334563.0 Ops/sec
__proto__ 10116120.0 Ops/sec
Script Preparation code:
Tests:
  • instanceof

  • tagName

  • nodeName

  • localName

  • __proto__

Open this result on MeasureThat.net