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 2804044.2 Ops/sec
tag name 2039496.4 Ops/sec
class name 1989685.2 Ops/sec
id 1284723.6 Ops/sec
array of node 1724874.0 Ops/sec
array item 3575415.0 Ops/sec
fastest iter childelements + getAttribute 5222444.5 Ops/sec
fastest iter childelements + nodeValue 9903146.0 Ops/sec
fastest iter childelements + textContent 4110033.0 Ops/sec
fastest iter childelements + getAttributeNode 3688479.2 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