Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0
Firefox 99
Windows
Desktop
2 years ago
Test name Executions per second
style.setProperty 10.9 Ops/sec
style.cssText 32.7 Ops/sec
style 29.4 Ops/sec
Object.assign 10.2 Ops/sec
setAttribute 478.6 Ops/sec
Assign property 11.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • style.setProperty

  • style.cssText

  • style

  • Object.assign

  • setAttribute

  • Assign property


;