Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 15_0_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1
Mobile Safari 15
iOS 15.0.2
Mobile
3 years ago
Test name Executions per second
Pure JS ID Selector 1449875.0 Ops/sec
Pure JS Class Selector 1351874.6 Ops/sec
Pure JS Data Hook 1096887.5 Ops/sec
jQuery ID Selector 1220890.4 Ops/sec
jQuery Class Selector 1028743.8 Ops/sec
jQuery Data Hook Selector 676179.2 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