Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Chrome 123
Windows
Desktop
8 months ago
Test name Executions per second
childNodes foreach 892333.1 Ops/sec
children (direct) 1368295.9 Ops/sec
firstChild nextSibling 6697686.5 Ops/sec
firstElementChild nextElementChild 9286549.0 Ops/sec
ChildNodes for (into variable) 2629709.5 Ops/sec
children-- (direct) 2275038.2 Ops/sec
ChildNodes for-- (into variable) 1292105.1 Ops/sec
ChildNodes for-- (direct) 3192008.8 Ops/sec
lastElementChild previousElementChild 9214372.0 Ops/sec
children-- (into variable) 4485891.5 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)