Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
Chrome 63
Linux
Desktop
5 years ago
Test name Executions per second
getElementById 3688926.2 Ops/sec
getElementsByTagName 1752969.8 Ops/sec
querySelector 1942102.4 Ops/sec
getElementsByClassName 1350130.4 Ops/sec
getElementsByName 1553104.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName