Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
Firefox 118
Linux
Desktop
one year ago
Test name Executions per second
fastest iter childelements 1313306.0 Ops/sec
tag name 1035216.2 Ops/sec
class name 1036659.2 Ops/sec
id 744556.4 Ops/sec
array of node 1495514.5 Ops/sec
array item 89209712.0 Ops/sec
fastest iter childelements + getAttribute 6581871.0 Ops/sec
fastest iter childelements + nodeValue 11118300.0 Ops/sec
fastest iter childelements + textContent 5747947.0 Ops/sec
fastest iter childelements + getAttributeNode 2102916.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