Run details:
Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Chrome OS 14541.0.0
Desktop
one year ago
Test name Executions per second
hasAttribute 5525314.5 Ops/sec
getAttribute 5439615.0 Ops/sec
classList 5150343.0 Ops/sec
hasAttribute single 6211976.5 Ops/sec
getAttribute single 5305263.0 Ops/sec
classList single 5228991.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single