Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
Chrome 95
Linux
Desktop
3 years ago
Test name Executions per second
fastest iter childelements + setAttribute 548454.3 Ops/sec
Array item 2117794.8 Ops/sec
fastest iter childelements + attributes 596638.1 Ops/sec
fastest iter childelements + nodeValue 2429741.5 Ops/sec
fastest iter childelements + textContent 1606824.2 Ops/sec
Array object 2017685.8 Ops/sec
fastest iter childelements + dataset 521969.2 Ops/sec
fastest iter childelements + getAttributeNode 692651.0 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