Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0
Firefox 107
Windows
Desktop
2 years ago
Test name Executions per second
hasAttribute 3802391.2 Ops/sec
getAttribute 2684894.0 Ops/sec
classList 3186181.5 Ops/sec
hasAttribute single 4026397.0 Ops/sec
getAttribute single 2957521.0 Ops/sec
classList single 3066105.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single