HTML Preparation code:
Tests:

Historical Performance Data aggregated from 126 community runs

Desktop Results:
Chrome 67 runs
Class
8.3M/s
ID
5.8M/s
data attribute
5.2M/s

Fastest: Class (1.6x faster)

View exact numbers
  • Class: 8,272,336 ops/sec
  • ID: 5,827,703 ops/sec
  • data attribute: 5,221,440 ops/sec
Firefox 20 runs
ID
3.9M/s
Class
3.9M/s
data attribute
3.3M/s

Fastest: ID (1.2x faster)

View exact numbers
  • ID: 3,949,456 ops/sec
  • Class: 3,942,976 ops/sec
  • data attribute: 3,326,852 ops/sec
Safari 7 runs
Class
8.6M/s
ID
7.9M/s
data attribute
7.5M/s

Fastest: Class (1.1x faster)

View exact numbers
  • Class: 8,631,470 ops/sec
  • ID: 7,910,502 ops/sec
  • data attribute: 7,548,686 ops/sec
Other 7 runs
Class
4.4M/s
ID
3.0M/s
data attribute
2.8M/s

Fastest: Class (1.6x faster)

View exact numbers
  • Class: 4,433,482 ops/sec
  • ID: 3,020,541 ops/sec
  • data attribute: 2,770,717 ops/sec
Mobile Results:
Chrome 17 runs
Class
6.2M/s
ID
5.1M/s
data attribute
5.1M/s

Fastest: Class (1.2x faster)

View exact numbers
  • Class: 6,173,067 ops/sec
  • ID: 5,129,163 ops/sec
  • data attribute: 5,082,801 ops/sec
Safari 8 runs
Class
6.5M/s
data attribute
6.3M/s
ID
6.0M/s
View exact numbers
  • Class: 6,489,701 ops/sec
  • data attribute: 6,251,073 ops/sec
  • ID: 6,039,934 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
    Class
    ID
    data attribute

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 9 months ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Chrome 142 on Linux
View result in a separate tab
Class
21.3M/s
ID
11.1M/s
data attribute
10.7M/s
View exact numbers
Test name Executions per second
Class 21,317,442 Ops/sec
ID 11,073,403 Ops/sec
data attribute 10,652,160 Ops/sec