Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36
Chrome 69
Linux
Desktop
6 years ago
Test name Executions per second
Get element by class - Vanilla 3899620.8 Ops/sec
Get element by class - JQuery 607125.4 Ops/sec
Add class - Vanilla 1278137.0 Ops/sec
Add class - JQuery 260416.2 Ops/sec
Remove class - Vanilla 1386691.0 Ops/sec
Remove class - JQuery 285504.5 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