Run details:
Mozilla/5.0 (Linux; Android 8.1.0; MI 8 SE) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.120 Mobile Safari/537.36
Chrome Mobile 91
Android 8.1.0
Mobile
3 years ago
Test name Executions per second
Pure JS ID Selector 31973.2 Ops/sec
Pure JS Class Selector 30459.1 Ops/sec
Pure JS Data Hook 25740.2 Ops/sec
jQuery ID Selector 27441.2 Ops/sec
jQuery Class Selector 22877.8 Ops/sec
jQuery Data Hook Selector 20089.0 Ops/sec
HTML Preparation code:
Tests:
  • Pure JS ID Selector

  • Pure JS Class Selector

  • Pure JS Data Hook

  • jQuery ID Selector

  • jQuery Class Selector

  • jQuery Data Hook Selector