Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 OPR/96.0.0.0
Opera 96
Linux
Desktop
one year ago
Test name Executions per second
Vanilla JS ID Selector 3848184.0 Ops/sec
Vanilla JS Class Selector 3656952.2 Ops/sec
Vanilla JS Data Hook 1062592.4 Ops/sec
jQuery ID Selector 1501961.6 Ops/sec
jQuery Class Selector 769451.4 Ops/sec
jQuery Data Hook Selector 484068.9 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


;