Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:73.0) Gecko/20100101 Firefox/73.0
Firefox 73
Mac OS X 10.14
Desktop
4 years ago
Test name Executions per second
Pure JS ID Selector 48822.1 Ops/sec
Pure JS Class Selector 48314.6 Ops/sec
Pure JS Data Hook 38802.3 Ops/sec
jQuery ID Selector 42853.6 Ops/sec
jQuery Class Selector 36297.3 Ops/sec
jQuery Data Hook Selector 31516.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