Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36
Chrome 89
Mac OS X 10.13.6
Desktop
3 years ago
Test name Executions per second
Pure JS ID Selector 38695.1 Ops/sec
Pure JS Class Selector 40096.7 Ops/sec
Pure JS Data Hook 33374.5 Ops/sec
jQuery ID Selector 38283.1 Ops/sec
jQuery Class Selector 32243.7 Ops/sec
jQuery Data Hook Selector 30782.1 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