Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0
Firefox 129
Ubuntu
Desktop
4 months ago
Test name Executions per second
childNodes foreach 6936456.5 Ops/sec
children (direct) 9048877.0 Ops/sec
firstChild nextSibling 30255606.0 Ops/sec
firstElementChild nextElementChild 74216760.0 Ops/sec
ChildNodes for (into variable) 7573174.5 Ops/sec
children-- (direct) 15181384.0 Ops/sec
ChildNodes for-- (into variable) 7739360.5 Ops/sec
ChildNodes for-- (direct) 11540743.0 Ops/sec
lastElementChild previousElementChild 59459012.0 Ops/sec
children-- (into variable) 21613246.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • childNodes foreach

  • children (direct)

  • firstChild nextSibling

  • firstElementChild nextElementChild

  • ChildNodes for (into variable)

  • children-- (direct)

  • ChildNodes for-- (into variable)

  • ChildNodes for-- (direct)

  • lastElementChild previousElementChild

  • children-- (into variable)