Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Firefox 129
Windows
Desktop
3 months ago
Test name Executions per second
childNodes foreach 2851683.8 Ops/sec
children (direct) 3301994.2 Ops/sec
firstChild nextSibling 11913842.0 Ops/sec
firstElementChild nextElementChild 25814052.0 Ops/sec
ChildNodes for (into variable) 3122382.8 Ops/sec
children-- (direct) 5945169.5 Ops/sec
ChildNodes for-- (into variable) 3796032.2 Ops/sec
ChildNodes for-- (direct) 5921567.5 Ops/sec
lastElementChild previousElementChild 24404984.0 Ops/sec
children-- (into variable) 8791705.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)