Run details:
Mozilla/5.0 (Linux; Android 12; SM-S906E) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36
Chrome Mobile 107
Android
Mobile
2 years ago
Test name Executions per second
hasAttribute 2680868.5 Ops/sec
getAttribute 2400441.2 Ops/sec
classList 2535798.2 Ops/sec
hasAttribute single 3238115.2 Ops/sec
getAttribute single 2612682.0 Ops/sec
classList single 2446985.2 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single