Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.182 Safari/537.36 OPR/74.0.3911.203
Opera 74
Linux
Desktop
3 years ago
Test name Executions per second
hasAttribute 2903601.2 Ops/sec
getAttribute 2897870.5 Ops/sec
classList 2974025.0 Ops/sec
hasAttribute single 3356904.5 Ops/sec
getAttribute single 2983861.5 Ops/sec
classList single 3923070.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single