Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1
Mobile Safari 12
iOS 12.1
Mobile
6 years ago
Test name Executions per second
Get element by class - Vanilla 651992.3 Ops/sec
Get element by class - JQuery 111293.2 Ops/sec
Add class - Vanilla 267099.4 Ops/sec
Add class - JQuery 56017.5 Ops/sec
Remove class - Vanilla 301188.0 Ops/sec
Remove class - JQuery 54922.1 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