Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36
Chrome 81
Linux
Desktop
4 years ago
Test name Executions per second
getElementById 3353010.0 Ops/sec
getElementsByTagName 1247320.2 Ops/sec
querySelector 1607139.0 Ops/sec
getElementsByClassName 1491747.1 Ops/sec
getElementsByName 1617175.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName