Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0
Firefox 88
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
hasAttribute 5197156.5 Ops/sec
getAttribute 3728379.8 Ops/sec
classList 4395068.5 Ops/sec
hasAttribute single 5068415.0 Ops/sec
getAttribute single 3702863.0 Ops/sec
classList single 4389437.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single