Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Firefox 133
Linux
Desktop
24 days ago
Test name Executions per second
Vanilla JS ID Selector 7149209.0 Ops/sec
Vanilla JS Class Selector 7134246.5 Ops/sec
Vanilla JS Query Selector All 2072425.1 Ops/sec
Vanilla JS Query Selector 4334110.0 Ops/sec
Vanilla JS Data Hook 1732296.9 Ops/sec
jQuery ID Selector 8761274.0 Ops/sec
jQuery Class Selector 2135061.2 Ops/sec
jQuery Data Hook Selector 1106765.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