Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3431.0 Safari/537.36
Chrome 68
Mac OS X 10.13.4
Other
6 years ago
Test name Executions per second
Use hasClass shorthand 3323828.0 Ops/sec
Use classList 3755621.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Use hasClass shorthand

  • Use classList