Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0
Firefox 60
Mac OS X 10.13
Desktop
6 years ago
Test name Executions per second
Use hasClass shorthand 3016506.0 Ops/sec
Use classList 8018478.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Use hasClass shorthand

  • Use classList