Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Chrome 124
Windows
Desktop
6 months ago
Test name Executions per second
Vanilla JS ID Selector 12516590.0 Ops/sec
Vanilla JS Class Selector 11423943.0 Ops/sec
Vanilla JS Data Hook 3078317.2 Ops/sec
jQuery ID Selector 4618500.0 Ops/sec
jQuery Class Selector 2238956.5 Ops/sec
jQuery Data Hook Selector 1362729.5 Ops/sec
HTML Preparation code:
Tests:
  • Vanilla JS ID Selector

  • Vanilla JS Class Selector

  • Vanilla JS Data Hook

  • jQuery ID Selector

  • jQuery Class Selector

  • jQuery Data Hook Selector


;