Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Chrome 97
Linux
Desktop
2 years ago
Test name Executions per second
hasAttribute 1129768.0 Ops/sec
getAttribute 1102655.0 Ops/sec
classList 1137457.6 Ops/sec
hasAttribute single 1343337.5 Ops/sec
getAttribute single 1162508.2 Ops/sec
classList single 1453831.8 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single