Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Chrome 107
Windows
Desktop
2 years ago
Test name Executions per second
getElementById 5346036.0 Ops/sec
getElementsByTagName 3134545.0 Ops/sec
querySelector 3402868.2 Ops/sec
getElementsByClassName 3006376.0 Ops/sec
getElementsByName 3511252.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName