Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Chrome 70
Mac OS X 10.13.6
Desktop
6 years ago
Test name Executions per second
Get element by class - Vanilla 3010946.8 Ops/sec
Get element by class - JQuery 270768.4 Ops/sec
Add class - Vanilla 796185.7 Ops/sec
Add class - JQuery 132056.2 Ops/sec
Remove class - Vanilla 817105.2 Ops/sec
Remove class - JQuery 144766.2 Ops/sec
HTML Preparation code:
Tests:
  • Get element by class - Vanilla

  • Get element by class - JQuery

  • Add class - Vanilla

  • Add class - JQuery

  • Remove class - Vanilla

  • Remove class - JQuery