Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Linux
Desktop
10 months ago
Test name Executions per second
childNodes foreach 318736.1 Ops/sec
children (direct) 562531.8 Ops/sec
firstChild nextSibling 2747960.2 Ops/sec
firstElementChild nextElementChild 3874191.5 Ops/sec
ChildNodes for (into variable) 977368.4 Ops/sec
children-- (direct) 958726.2 Ops/sec
ChildNodes for-- (into variable) 489456.1 Ops/sec
ChildNodes for-- (direct) 1293014.0 Ops/sec
lastElementChild previousElementChild 3800951.8 Ops/sec
children-- (into variable) 2093623.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)


;