Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:65.0) Gecko/20100101 Firefox/65.0
Firefox 65
Mac OS X 10.13
Desktop
5 years ago
Test name Executions per second
Style by property Fixed Values 154895.5 Ops/sec
Style by name Fixed Values 145656.8 Ops/sec
setAttribute Fixed Values 4996666.0 Ops/sec
setProperty Fixed Values 293077.3 Ops/sec
Style by property Single Random Value 332893.4 Ops/sec
Style by name Single Random Value 341754.3 Ops/sec
setAttribute Single Random Value 235734.4 Ops/sec
setProperty Single Random Value 393926.6 Ops/sec
Style by property All Random Values 293165.3 Ops/sec
Style by name All Random Values 294099.2 Ops/sec
setAttributey All Random Values 254972.2 Ops/sec
setProperty All Random Values 278237.3 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Style by property Fixed Values

  • Style by name Fixed Values

  • setAttribute Fixed Values

  • setProperty Fixed Values

  • Style by property Single Random Value

  • Style by name Single Random Value

  • setAttribute Single Random Value

  • setProperty Single Random Value

  • Style by property All Random Values

  • Style by name All Random Values

  • setAttributey All Random Values

  • setProperty All Random Values