Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Chrome 92
Mac OS X 10.15.1
Desktop
3 years ago
Test name Executions per second
Pure JS ID Selector 39980.9 Ops/sec
Pure JS Class Selector 41179.3 Ops/sec
Pure JS Data Hook 34698.5 Ops/sec
jQuery ID Selector 35610.2 Ops/sec
jQuery Class Selector 37211.8 Ops/sec
jQuery Data Hook Selector 31593.9 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