Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.84 Safari/537.36
Chrome 99
Windows 7
Desktop
2 years ago
Test name Executions per second
hasAttribute 897449.1 Ops/sec
getAttribute 874034.4 Ops/sec
classList 899778.5 Ops/sec
hasAttribute single 1011919.9 Ops/sec
getAttribute single 865648.2 Ops/sec
classList single 1111413.6 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single


;