Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 OPR/83.0.4254.27
Opera 83
Windows 7
Desktop
2 years ago
Test name Executions per second
style.setProperty 8.8 Ops/sec
style.cssText 12.1 Ops/sec
style 10.7 Ops/sec
Object.assign 9.8 Ops/sec
setAttribute 12.3 Ops/sec
Assign property 8.1 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • style.setProperty

  • style.cssText

  • style

  • Object.assign

  • setAttribute

  • Assign property


;