HTML Preparation code:
Script Preparation code:
Tests:
  • style.setProperty

  • style.cssText

  • style

  • Object.assign

  • setAttribute

  • direct assignment

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    style.setProperty
    style.cssText
    style
    Object.assign
    setAttribute
    direct assignment

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Chrome 129 on Linux
View result in a separate tab
Test name Executions per second
style.setProperty 19.7 Ops/sec
style.cssText 27.1 Ops/sec
style 26.1 Ops/sec
Object.assign 19.4 Ops/sec
setAttribute 141.5 Ops/sec
direct assignment 9.8 Ops/sec


;