Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/537.36 (KHTML, like Gecko) Version/8.0 Safari/537.36
Safari 8
Mac OS X 10.10
Desktop
3 years ago
Test name Executions per second
Pure JS ID Selector 38497.1 Ops/sec
Pure JS Class Selector 37689.8 Ops/sec
Pure JS Data Hook 32289.5 Ops/sec
jQuery ID Selector 36860.7 Ops/sec
jQuery Class Selector 28541.6 Ops/sec
jQuery Data Hook Selector 25220.6 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