Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36
Chrome 106
Windows
Desktop
2 years ago
Test name Executions per second
getElementById 2628116.8 Ops/sec
getElementsByTagName 1452732.9 Ops/sec
querySelector 1589137.8 Ops/sec
getElementsByClassName 1446686.6 Ops/sec
getElementsByName 1616600.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName