Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:131.0) Gecko/20100101 Firefox/131.0
Firefox 131
Mac OS X 10.15
Desktop
2 months ago
Test name Executions per second
Vanilla JS ID Selector 7942768.0 Ops/sec
Vanilla JS Class Selector 7524228.0 Ops/sec
Vanilla JS Query Selector All 1650965.0 Ops/sec
Vanilla JS Query Selector 3703570.5 Ops/sec
Vanilla JS Data Hook 1246821.1 Ops/sec
jQuery ID Selector 6359002.5 Ops/sec
jQuery Class Selector 1528725.9 Ops/sec
jQuery Data Hook Selector 826776.4 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