Run details:
Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Chrome 71
Fedora
Desktop
5 years ago
Test name Executions per second
jQuery 3.3.1 addClass/removeClass 43781.8 Ops/sec
jQuery 2.1.4 addClass/removeClass 64419.6 Ops/sec
Vanilla JS classList add/remove 91093.1 Ops/sec
HTML Preparation code:
Tests:
  • jQuery 3.3.1 addClass/removeClass

  • jQuery 2.1.4 addClass/removeClass

  • Vanilla JS classList add/remove


;