HTML Preparation code:
Script Preparation code:
Tests:
  • Use hasClass shorthand

  • Use classList

  • Use classname match

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Use hasClass shorthand
    Use classList
    Use classname match

    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; rv:108.0) Gecko/20100101 Firefox/108.0
Firefox 108 on Mac OS X 10.15
View result in a separate tab
Test name Executions per second
Use hasClass shorthand 178335.8 Ops/sec
Use classList 1209278720.0 Ops/sec
Use classname match 3216120.5 Ops/sec


;