Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Chrome 108
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
ID 357051.5 Ops/sec
Data 205567.5 Ops/sec
class 260553.1 Ops/sec
ID vanilla 4634798.0 Ops/sec
class vanilla 4284235.0 Ops/sec
querySelector Attribute 2123357.2 Ops/sec
querySelector ID 2712899.5 Ops/sec
querySelector Class 3134351.2 Ops/sec
HTML Preparation code:
Tests:
  • ID

  • Data

  • class

  • ID vanilla

  • class vanilla

  • querySelector Attribute

  • querySelector ID

  • querySelector Class