Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:125.0) Gecko/20100101 Firefox/125.0
Firefox 125
Mac OS X 10.15
Desktop
7 months ago
Test name Executions per second
style.setProperty 5.3 Ops/sec
style.cssText 15.7 Ops/sec
style 12.8 Ops/sec
Object.assign 4.6 Ops/sec
setAttribute 362.1 Ops/sec
Assign property 5.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • style.setProperty

  • style.cssText

  • style

  • Object.assign

  • setAttribute

  • Assign property