Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95
Ubuntu
Desktop
2 years ago
Test name Executions per second
hasAttribute 4210507.5 Ops/sec
getAttribute 2946508.8 Ops/sec
classList 3581846.2 Ops/sec
hasAttribute single 4122885.0 Ops/sec
getAttribute single 2963124.5 Ops/sec
classList single 3529276.8 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single