Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Mac OS X 10.15.7
Desktop
6 months ago
Test name Executions per second
Vanilla JS ID Selector 9271519.0 Ops/sec
Vanilla JS Class Selector 8886491.0 Ops/sec
Vanilla JS Query Selector All 3780734.5 Ops/sec
Vanilla JS Query Selector 7240105.0 Ops/sec
Vanilla JS Data Hook 3505836.2 Ops/sec
jQuery ID Selector 4446101.0 Ops/sec
jQuery Class Selector 1988191.9 Ops/sec
jQuery Data Hook Selector 1528463.8 Ops/sec
HTML Preparation code:
Tests:
  • Vanilla JS ID Selector

  • Vanilla JS Class Selector

  • Vanilla JS Query Selector All

  • Vanilla JS Query Selector

  • Vanilla JS Data Hook

  • jQuery ID Selector

  • jQuery Class Selector

  • jQuery Data Hook Selector