Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Firefox 82
Windows
Desktop
4 years ago
Test name Executions per second
getElementById 3861451.0 Ops/sec
getElementsByTagName 2022176.4 Ops/sec
querySelector 2042664.8 Ops/sec
getElementsByClassName 1937165.1 Ops/sec
getElementsByName 2369227.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName