Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Chrome 98
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
jQuery addClass 1768.3 Ops/sec
Dom7 addClass 2277.1 Ops/sec
jQuery removeClass 2340.6 Ops/sec
Dom7 removeClass 2655.3 Ops/sec
jQuery toggleClass 550.0 Ops/sec
Dom7 toggleClass 2303.3 Ops/sec
jQuery set attr (Object) 1865.4 Ops/sec
Dom7 set attr (Object) 1614.2 Ops/sec
jQuery removeAttr 1527.7 Ops/sec
Dom7 removeAttr 3985.7 Ops/sec
jQuery css 2102.1 Ops/sec
Dom7 css 2524.3 Ops/sec
jQuery set attr 2839.3 Ops/sec
Dom7 set attr 2818.2 Ops/sec
jQuery each 329.2 Ops/sec
Dom7 each 287.2 Ops/sec
jQuery css (Object) 285.4 Ops/sec
Dom7 css (Object) 683.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • jQuery addClass

  • Dom7 each

  • jQuery each

  • Dom7 set attr

  • jQuery set attr

  • Dom7 css

  • jQuery css

  • Dom7 removeAttr

  • jQuery removeAttr

  • Dom7 set attr (Object)

  • jQuery set attr (Object)

  • Dom7 toggleClass

  • jQuery toggleClass

  • Dom7 removeClass

  • jQuery removeClass

  • Dom7 addClass

  • jQuery css (Object)

  • Dom7 css (Object)