Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0
Firefox 110
Linux
Desktop
one year ago
Test name Executions per second
fastest iter childelements 1829338.2 Ops/sec
tag name 1477045.5 Ops/sec
class name 1466709.4 Ops/sec
id 1072931.6 Ops/sec
array of node 2026058.9 Ops/sec
array item 200652032.0 Ops/sec
fastest iter childelements + getAttribute 8877777.0 Ops/sec
fastest iter childelements + nodeValue 14239759.0 Ops/sec
fastest iter childelements + textContent 8403773.0 Ops/sec
fastest iter childelements + getAttributeNode 2757558.2 Ops/sec
tag name-- 1732371.9 Ops/sec
class name-- 1737964.9 Ops/sec
queryselectorall class-- 1146137.8 Ops/sec
queryselectorall tag-- 1117409.2 Ops/sec
array item-- 216271008.0 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

  • tag name--

  • class name--

  • queryselectorall class--

  • queryselectorall tag--

  • array item--