Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Chrome 108
Windows
Desktop
2 years ago
Test name Executions per second
setAttribute(...) 15323.9 Ops/sec
classList.add(...) 13090.3 Ops/sec
classList.value 19405.0 Ops/sec
ClassName 24105.2 Ops/sec
HTML Preparation code:
Tests:
  • setAttribute(...)

  • classList.add(...)

  • classList.value

  • ClassName