Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
Chrome 95
Linux
Desktop
3 years ago
Test name Executions per second
fastest iter childelements 1266798.6 Ops/sec
tag name 829503.0 Ops/sec
class name 831652.4 Ops/sec
id 605710.1 Ops/sec
array of node 789331.0 Ops/sec
array item 2095123.1 Ops/sec
fastest iter childelements + getAttribute 2099749.5 Ops/sec
fastest iter childelements + nodeValue 6588203.5 Ops/sec
fastest iter childelements + textContent 2391537.8 Ops/sec
fastest iter childelements + getAttributeNode 1598618.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • fastest iter childelements

  • tag name

  • class name

  • id

  • array of node

  • array item

  • fastest iter childelements + getAttribute

  • fastest iter childelements + nodeValue

  • fastest iter childelements + textContent

  • fastest iter childelements + getAttributeNode