Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Firefox 53
Windows
Other
6 years ago
Test name Executions per second
$.hasClass 2869671.8 Ops/sec
RegExp 11615304.0 Ops/sec
Dry RegExp 1398111.4 Ops/sec
indexOf 22589458.0 Ops/sec
classList 21449942.0 Ops/sec
hasClassString 13630111.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • $.hasClass

  • RegExp

  • Dry RegExp

  • indexOf

  • classList

  • hasClassString


;