Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36
Chrome 88
Mac OS X 11.2.2
Desktop
3 years ago
Test name Executions per second
Pure JS ID Selector 55827.3 Ops/sec
Pure JS Class Selector 55412.6 Ops/sec
Pure JS Data Hook 48792.9 Ops/sec
jQuery ID Selector 54050.1 Ops/sec
jQuery Class Selector 47703.8 Ops/sec
jQuery Data Hook Selector 42931.4 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