Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36
Chrome 90
Mac OS X 10.14.6
Desktop
3 years ago
Test name Executions per second
Pure JS ID Selector 76921.6 Ops/sec
Pure JS Class Selector 73932.3 Ops/sec
Pure JS Data Hook 64943.7 Ops/sec
jQuery ID Selector 71399.8 Ops/sec
jQuery Class Selector 63213.7 Ops/sec
jQuery Data Hook Selector 58423.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