Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0
Opera 106
Windows
Desktop
one year ago
Test name Executions per second
Pure JS ID Selector 99086.3 Ops/sec
Pure JS Class Selector 101477.1 Ops/sec
Pure JS Data Hook 71591.4 Ops/sec
jQuery ID Selector 93882.1 Ops/sec
jQuery Class Selector 79646.9 Ops/sec
jQuery Data Hook Selector 64436.1 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