HTML Preparation code:
Tests:

Historical Performance Data aggregated from 17 community runs

Desktop Results:
Chrome 11 runs
has attr
5K/s
getAttribute
4K/s
dataset
2K/s

Fastest: has attr (2.7x faster)

View exact numbers
  • has attr: 4,706 ops/sec
  • getAttribute: 4,326 ops/sec
  • dataset: 1,741 ops/sec
Firefox 6 runs
has attr
111K/s
getAttribute
111K/s
dataset
1K/s

Fastest: has attr (103.3x faster)

View exact numbers
  • has attr: 110,731 ops/sec
  • getAttribute: 110,600 ops/sec
  • dataset: 1,072 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
    getAttribute
    dataset
    has attr

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36
Chrome 149 on Windows
View result in a separate tab
getAttribute
2K/s
has attr
2K/s
dataset
902/s
View exact numbers
Test name Executions per second
getAttribute 1,729 Ops/sec
has attr 1,618 Ops/sec
dataset 902 Ops/sec