Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:88.0) Gecko/20100101 Firefox/88.0
Firefox 88
Windows
Desktop
3 years ago
Test name Executions per second
hasAttribute 3382370.8 Ops/sec
getAttribute 2610194.2 Ops/sec
classList 2883643.2 Ops/sec
hasAttribute single 3398849.8 Ops/sec
getAttribute single 2656844.5 Ops/sec
classList single 2859735.2 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single