Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Chrome 89
Linux
Desktop
3 years ago
Test name Executions per second
Pure JS ID Selector 54228.9 Ops/sec
Pure JS Class Selector 55167.8 Ops/sec
Pure JS Data Hook 45639.5 Ops/sec
jQuery ID Selector 48235.4 Ops/sec
jQuery Class Selector 42913.0 Ops/sec
jQuery Data Hook Selector 35067.0 Ops/sec
HTML Preparation code:
Tests:
  • Pure JS ID Selector

  • Pure JS Class Selector

  • Pure JS Data Hook

  • jQuery ID Selector

  • jQuery Class Selector

  • jQuery Data Hook Selector