Run details:
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0
Firefox 67
Fedora
Desktop
5 years ago
Test name Executions per second
getElementById 3583568.0 Ops/sec
getElementsByTagName 2444353.2 Ops/sec
querySelector 2565889.2 Ops/sec
getElementsByClassName 2246010.2 Ops/sec
getElementsByName 3960229.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName