Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0
Firefox 72
Windows 7
Desktop
4 years ago
Test name Executions per second
setProperty Single Random Value 133535.8 Ops/sec
setProperty All Random Values 79449.6 Ops/sec
setAttribute Fixed Values 2694913.0 Ops/sec
setAttribute Single Random Value 78486.7 Ops/sec
setAttributey All Random Values 72897.2 Ops/sec
Style by name Fixed Values 124243.9 Ops/sec
Style by name Single Random Value 151437.7 Ops/sec
Style by name All Random Values 88133.4 Ops/sec
Style by property Fixed Values 123879.4 Ops/sec
Style by property Single Random Value 151716.2 Ops/sec
Style by property All Random Values 87908.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • setProperty Single Random Value

  • setProperty All Random Values

  • setAttribute Fixed Values

  • setAttribute Single Random Value

  • setAttributey All Random Values

  • Style by name Fixed Values

  • Style by name Single Random Value

  • Style by name All Random Values

  • Style by property Fixed Values

  • Style by property Single Random Value

  • Style by property All Random Values