Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36
Chrome 91
Windows
Desktop
3 years ago
Test name Executions per second
hasAttribute 3604219.8 Ops/sec
getAttribute 3402032.2 Ops/sec
classList 3434098.5 Ops/sec
hasAttribute single 3838445.5 Ops/sec
getAttribute single 3469954.5 Ops/sec
classList single 4266545.5 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single


;