Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Mac OS X 10.10
Desktop
2 years ago
Test name Executions per second
Pure JS ID Selector 42661.4 Ops/sec
Pure JS Class Selector 34898.7 Ops/sec
Pure JS Data Hook 34188.0 Ops/sec
jQuery ID Selector 36469.4 Ops/sec
jQuery Class Selector 35388.5 Ops/sec
jQuery Data Hook Selector 31172.8 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