Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Chrome 116
Windows
Desktop
one year ago
Test name Executions per second
Vanilla JS ID Selector 11916230.0 Ops/sec
Vanilla JS Class Selector 10764793.0 Ops/sec
Vanilla JS Query Selector All 3727024.2 Ops/sec
Vanilla JS Query Selector 8546005.0 Ops/sec
Vanilla JS Data Hook 2690468.5 Ops/sec
jQuery ID Selector 4512687.5 Ops/sec
jQuery Class Selector 1749219.1 Ops/sec
jQuery Data Hook Selector 1177061.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