Run details:
Mozilla/5.0 (Linux; Android 8.0.0; SM-J330F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.157 Mobile Safari/537.36 OPT/1.16.62
Chrome Mobile 74
Android 8.0.0
Mobile
5 years ago
Test name Executions per second
getElementById 501052.6 Ops/sec
getElementsByTagName 207355.5 Ops/sec
querySelector 234730.2 Ops/sec
getElementsByClassName 199877.1 Ops/sec
getElementsByName 229241.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName