Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Linux
Desktop
one year ago
Test name Executions per second
fastest iter childelements 2003870.1 Ops/sec
tag name 1470892.9 Ops/sec
class name 1418737.5 Ops/sec
id 1047873.9 Ops/sec
array of node 1377730.0 Ops/sec
array item 3351653.8 Ops/sec
fastest iter childelements + getAttribute 3919303.0 Ops/sec
fastest iter childelements + nodeValue 8775474.0 Ops/sec
fastest iter childelements + textContent 2947924.2 Ops/sec
fastest iter childelements + getAttributeNode 2710539.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