Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.0.1
Mobile
2 years ago
Test name Executions per second
hasAttribute 11525896.0 Ops/sec
getAttribute 11559099.0 Ops/sec
classList 11946057.0 Ops/sec
hasAttribute single 13168475.0 Ops/sec
getAttribute single 11665610.0 Ops/sec
classList single 11727372.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single