Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Mobile Safari/537.36
Chrome Mobile 113
Android
Mobile
one year ago
Test name Executions per second
childNodes foreach 184234.5 Ops/sec
children (direct) 284639.7 Ops/sec
firstChild nextSibling 1676688.6 Ops/sec
firstElementChild nextElementChild 2256512.8 Ops/sec
ChildNodes for (into variable) 517531.1 Ops/sec
children-- (direct) 457055.4 Ops/sec
ChildNodes for-- (into variable) 239978.0 Ops/sec
ChildNodes for-- (direct) 596429.3 Ops/sec
lastElementChild previousElementChild 2265529.0 Ops/sec
children-- (into variable) 971772.9 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)