Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
Chrome 100
Windows
Desktop
2 years ago
Test name Executions per second
hasAttribute 3530476.2 Ops/sec
getAttribute 3449651.0 Ops/sec
classList 3479701.2 Ops/sec
hasAttribute single 3892240.0 Ops/sec
getAttribute single 3605383.0 Ops/sec
classList single 4484726.5 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single


;