Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0
Firefox 98
Mac OS X 10.15
Desktop
2 years ago
Test name Executions per second
Pure JS ID Selector 86889.3 Ops/sec
Pure JS Class Selector 87417.6 Ops/sec
Pure JS Data Hook 71578.5 Ops/sec
jQuery ID Selector 78394.7 Ops/sec
jQuery Class Selector 68812.1 Ops/sec
jQuery Data Hook Selector 59517.2 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