Run details:
Mozilla/5.0 (Linux; Android 10; SM-N960U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.105 Mobile Safari/537.36
Chrome Mobile 89
Android
Mobile
3 years ago
Test name Executions per second
jQuery 3.3.1 addClass/removeClass 36244.2 Ops/sec
jQuery 2.1.4 addClass/removeClass 50828.4 Ops/sec
Vanilla JS classList add/remove 62108.1 Ops/sec
HTML Preparation code:
Tests:
  • jQuery 3.3.1 addClass/removeClass

  • jQuery 2.1.4 addClass/removeClass

  • Vanilla JS classList add/remove