Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/66.0.3359.170 Chrome/66.0.3359.170 Safari/537.36
Chromium 66
Ubuntu
Other
6 years ago
Test name Executions per second
getElementById 5596293.0 Ops/sec
getElementsByTagName 2153552.5 Ops/sec
querySelector 2605541.8 Ops/sec
getElementsByClassName 2213775.0 Ops/sec
getElementsByName 2442741.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName