Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Firefox 113
Ubuntu
Desktop
one year ago
Test name Executions per second
Vanilla JS ID Selector 17856980.0 Ops/sec
Vanilla JS Class Selector 17928866.0 Ops/sec
Vanilla JS Query Selector All 3960177.5 Ops/sec
Vanilla JS Query Selector 9476879.0 Ops/sec
Vanilla JS Data Hook 2106071.8 Ops/sec
jQuery ID Selector 12072788.0 Ops/sec
jQuery Class Selector 3029365.0 Ops/sec
jQuery Data Hook Selector 1304141.6 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