Run details:
Mozilla/5.0 (Linux; Android 9; Redmi Note 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Mobile Safari/537.36
Chrome Mobile 84
Android
Mobile
4 years ago
Test name Executions per second
getElementById 1778905.2 Ops/sec
getElementsByTagName 766220.5 Ops/sec
querySelector 861146.5 Ops/sec
getElementsByClassName 762119.6 Ops/sec
getElementsByName 846768.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName