Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Chrome 105
Linux
Desktop
2 years ago
Test name Executions per second
fastest iter childelements 2773468.0 Ops/sec
tag name 1984824.2 Ops/sec
class name 1928303.0 Ops/sec
id 1263964.2 Ops/sec
array of node 1679800.0 Ops/sec
array item 3551896.8 Ops/sec
fastest iter childelements + getAttribute 4817872.5 Ops/sec
fastest iter childelements + nodeValue 8961528.0 Ops/sec
fastest iter childelements + textContent 3835448.5 Ops/sec
fastest iter childelements + getAttributeNode 3375568.5 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