Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Windows
Desktop
one year ago
Test name Executions per second
hasAttribute 4379232.0 Ops/sec
getAttribute 4224531.5 Ops/sec
classList 3972678.5 Ops/sec
hasAttribute single 5005757.0 Ops/sec
getAttribute single 4277350.0 Ops/sec
classList single 4054393.2 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single