Run details:
Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0
Firefox 103
Windows 8.1
Desktop
2 years ago
Test name Executions per second
Pure JS ID Selector 88600.1 Ops/sec
Pure JS Class Selector 90888.2 Ops/sec
Pure JS Data Hook 71269.6 Ops/sec
jQuery ID Selector 78741.2 Ops/sec
jQuery Class Selector 68628.1 Ops/sec
jQuery Data Hook Selector 58941.5 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