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 2651.8 Ops/sec
Dom7 each 332.2 Ops/sec
jQuery each 353.6 Ops/sec
Dom7 set attr 3061.5 Ops/sec
jQuery set attr 3002.4 Ops/sec
Dom7 css 2515.4 Ops/sec
jQuery css 2152.4 Ops/sec
Dom7 removeAttr 4645.4 Ops/sec
jQuery removeAttr 3867.5 Ops/sec
Dom7 set attr (Object) 1715.4 Ops/sec
jQuery set attr (Object) 2092.3 Ops/sec
Dom7 toggleClass 2300.8 Ops/sec
jQuery toggleClass 848.9 Ops/sec
Dom7 removeClass 2547.3 Ops/sec
jQuery removeClass 4298.1 Ops/sec
Dom7 addClass 2228.3 Ops/sec
jQuery css (Object) 285.7 Ops/sec
Dom7 css (Object) 684.9 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)