Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.3 Safari/605.1.15
Safari 15
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
jQuery addClass 4272.8 Ops/sec
Dom7 each 493.2 Ops/sec
jQuery each 949.9 Ops/sec
Dom7 set attr 2896.6 Ops/sec
jQuery set attr 5376.0 Ops/sec
Dom7 css 1788.2 Ops/sec
jQuery css 4425.5 Ops/sec
Dom7 removeAttr 6138.4 Ops/sec
jQuery removeAttr 8962.5 Ops/sec
Dom7 set attr (Object) 4443.1 Ops/sec
jQuery set attr (Object) 6723.7 Ops/sec
Dom7 toggleClass 3141.8 Ops/sec
jQuery toggleClass 1244.3 Ops/sec
Dom7 removeClass 4063.3 Ops/sec
jQuery removeClass 5891.0 Ops/sec
Dom7 addClass 3311.1 Ops/sec
jQuery css (Object) 458.9 Ops/sec
Dom7 css (Object) 1222.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • jQuery addClass

  • Dom7 addClass

  • jQuery removeClass

  • Dom7 removeClass

  • jQuery toggleClass

  • Dom7 toggleClass

  • jQuery set attr (Object)

  • Dom7 set attr (Object)

  • jQuery removeAttr

  • Dom7 removeAttr

  • jQuery css

  • Dom7 css

  • jQuery set attr

  • Dom7 set attr

  • jQuery each

  • Dom7 each

  • jQuery css (Object)

  • Dom7 css (Object)