Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox 71
Linux
Desktop
4 years ago
Test name Executions per second
$.hasClass 2400232.2 Ops/sec
RegExp 11867711.0 Ops/sec
Dry RegExp 2949972.0 Ops/sec
indexOf 11763348.0 Ops/sec
classList 13912064.0 Ops/sec
hasClassString 7305567.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • $.hasClass

  • RegExp

  • Dry RegExp

  • indexOf

  • classList

  • hasClassString


;