Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15
Safari 13
Mac OS X 10.13.6
Desktop
one year ago
Test name Executions per second
jQuery 3.3.1 addClass/removeClass 150338.6 Ops/sec
jQuery 2.1.4 addClass/removeClass 184619.8 Ops/sec
Vanilla JS classList add/remove 398215.4 Ops/sec
HTML Preparation code:
Tests:
  • jQuery 3.3.1 addClass/removeClass

  • jQuery 2.1.4 addClass/removeClass

  • Vanilla JS classList add/remove