Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Firefox 50
Windows 7
Other
7 years ago
Test name Executions per second
getElementById 4813252.5 Ops/sec
getElementsByTagName 1876798.6 Ops/sec
querySelector 2037608.5 Ops/sec
getElementsByClassName 1904815.2 Ops/sec
getElementsByName 2433158.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName