Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Chrome 105
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
jQuery addClass 3689.1 Ops/sec
Dom7 addClass 4718.2 Ops/sec
jQuery removeClass 6030.0 Ops/sec
Dom7 removeClass 5990.9 Ops/sec
jQuery toggleClass 1643.6 Ops/sec
Dom7 toggleClass 4905.4 Ops/sec
jQuery set attr (Object) 4122.7 Ops/sec
Dom7 set attr (Object) 4569.1 Ops/sec
jQuery removeAttr 8425.1 Ops/sec
Dom7 removeAttr 12706.4 Ops/sec
jQuery css 3609.6 Ops/sec
Dom7 css 6335.4 Ops/sec
jQuery set attr 6243.1 Ops/sec
Dom7 set attr 8257.8 Ops/sec
jQuery each 591.9 Ops/sec
Dom7 each 607.5 Ops/sec
jQuery css (Object) 473.2 Ops/sec
Dom7 css (Object) 1546.4 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)