HTML Preparation code:
Tests:

Historical Performance Data aggregated from 15 community runs

Desktop Results:
Chrome 15 runs
getAttribute
13.7M/s
getBoundingClientRect
1.8M/s

Fastest: getAttribute (7.8x faster)

View exact numbers
  • getAttribute: 13,660,354 ops/sec
  • getBoundingClientRect : 1,757,736 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
    getBoundingClientRect
    getAttribute

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 23 days ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/150.0.0.0 Safari/537.36
Chrome 150 on Linux
View result in a separate tab
getAttribute
14.1M/s
getBoundingClientRect
1.3M/s
View exact numbers
Test name Executions per second
getAttribute 14,107,604 Ops/sec
getBoundingClientRect 1,266,998 Ops/sec