Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0
Firefox 96
Windows
Desktop
2 years ago
Test name Executions per second
hasAttribute 5766634.0 Ops/sec
getAttribute 4233932.0 Ops/sec
classList 4953708.5 Ops/sec
hasAttribute single 5817113.5 Ops/sec
getAttribute single 4323760.5 Ops/sec
classList single 4859698.5 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single