Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0
Firefox 102
Linux
Desktop
2 years ago
Test name Executions per second
style.setProperty 15.4 Ops/sec
style.cssText 36.9 Ops/sec
style 34.5 Ops/sec
Object.assign 14.7 Ops/sec
setAttribute 336.6 Ops/sec
Assign property 16.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • style.setProperty

  • style.cssText

  • style

  • Object.assign

  • setAttribute

  • Assign property


;