Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36
Chrome Mobile 125
Android
Mobile
7 months ago
Test name Executions per second
childNodes foreach 301982.3 Ops/sec
children (direct) 613946.8 Ops/sec
firstChild nextSibling 3313248.5 Ops/sec
firstElementChild nextElementChild 3491970.5 Ops/sec
ChildNodes for (into variable) 1008718.8 Ops/sec
children-- (direct) 2325779.0 Ops/sec
ChildNodes for-- (into variable) 1245486.9 Ops/sec
ChildNodes for-- (direct) 1875172.0 Ops/sec
lastElementChild previousElementChild 4831237.0 Ops/sec
children-- (into variable) 1457462.6 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)