Run details:
Mozilla/5.0 (iPhone; CPU OS 14_4_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/33.0 Mobile/15E148 Safari/605.1.15
Mobile Safari 14
iOS 14.4.2
Mobile
3 years ago
Test name Executions per second
hasAttribute 6533377.5 Ops/sec
getAttribute 6477735.5 Ops/sec
classList 6323859.0 Ops/sec
hasAttribute single 7287557.5 Ops/sec
getAttribute single 6029491.0 Ops/sec
classList single 5143444.5 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single