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

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    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

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
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 on Windows
View result in a separate tab
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