Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129
Linux
Desktop
2 months ago
Test name Executions per second
style.setProperty 21.4 Ops/sec
style.cssText 31.0 Ops/sec
style 27.0 Ops/sec
Object.assign 20.5 Ops/sec
setAttribute 140.1 Ops/sec
style properties 10.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • style.setProperty

  • style.cssText

  • style

  • Object.assign

  • setAttribute

  • style properties