Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.6 Mobile/15E148 Safari/604.1
Mobile Safari 15
iOS 15.6
Mobile
2 years ago
Test name Executions per second
Pure JS ID Selector 721375.6 Ops/sec
Pure JS Class Selector 655344.4 Ops/sec
Pure JS Data Hook 585382.2 Ops/sec
jQuery ID Selector 448373.1 Ops/sec
jQuery Class Selector 361452.9 Ops/sec
jQuery Data Hook Selector 304446.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