Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.71 Safari/537.36
Chrome 94
Windows
Desktop
3 years ago
Test name Executions per second
fastest iter childelements + setAttribute 218228.0 Ops/sec
Array item 878884.4 Ops/sec
fastest iter childelements + attributes 337581.0 Ops/sec
fastest iter childelements + nodeValue 1037791.8 Ops/sec
fastest iter childelements + textContent 488576.0 Ops/sec
Array object 584450.4 Ops/sec
fastest iter childelements + dataset 234569.4 Ops/sec
fastest iter childelements + getAttributeNode 291636.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • fastest iter childelements + setAttribute

  • Array item

  • fastest iter childelements + attributes

  • fastest iter childelements + nodeValue

  • fastest iter childelements + textContent

  • Array object

  • fastest iter childelements + dataset

  • fastest iter childelements + getAttributeNode