HTML Preparation code:
Tests:

Historical Performance Data aggregated from 61 community runs

Desktop Results:
Chrome 47 runs
class name
1.7M/s
data attribute
1.3M/s

Fastest: class name (1.4x faster)

View exact numbers
  • class name: 1,725,456 ops/sec
  • data attribute: 1,252,092 ops/sec
Firefox 14 runs
class name
833K/s
data attribute
644K/s

Fastest: class name (1.3x faster)

View exact numbers
  • class name: 833,269 ops/sec
  • data attribute: 644,427 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
    data attribute
    class name

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
Chrome 137 on Mac OS X 10.15.7
View result in a separate tab
class name
2.9M/s
data attribute
2.5M/s
View exact numbers
Test name Executions per second
class name 2,852,035 Ops/sec
data attribute 2,462,522 Ops/sec