HTML Preparation code:
Script Preparation code:
Tests:

Historical Performance Data aggregated from 26 community runs

Desktop Results:
Chrome 26 runs
firstElementChild nextElementChild
9.2M/s
firstChild nextSibling
6.5M/s
ChildNodes2
2.6M/s
children
1.3M/s
childNodes
905K/s

Fastest: firstElementChild nextElementChild (10.2x faster)

View exact numbers
  • firstElementChild nextElementChild: 9,202,290 ops/sec
  • firstChild nextSibling: 6,537,164 ops/sec
  • ChildNodes2: 2,551,081 ops/sec
  • children: 1,349,660 ops/sec
  • childNodes: 905,020 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    childNodes
    children
    firstChild nextSibling
    firstElementChild nextElementChild
    ChildNodes2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130 on Windows
View result in a separate tab
firstElementChild nextElementChild
11.1M/s
firstChild nextSibling
8.0M/s
ChildNodes2
3.2M/s
children
1.7M/s
childNodes
1.2M/s
View exact numbers
Test name Executions per second
firstElementChild nextElementChild 11,051,960 Ops/sec
firstChild nextSibling 7,975,128 Ops/sec
ChildNodes2 3,174,581 Ops/sec
children 1,717,998 Ops/sec
childNodes 1,170,831 Ops/sec