HTML Preparation code:
Tests:
  • className

  • setAttribute

  • classList

  • setAttribute custom

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    className
    setAttribute
    classList
    setAttribute custom

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Chrome 81 on Mac OS X 10.13.4
View result in a separate tab
Test name Executions per second
className 3364.1 Ops/sec
setAttribute 1855.7 Ops/sec
classList 2279.6 Ops/sec
setAttribute custom 2158.0 Ops/sec