Run details:
Mozilla/5.0 (Windows NT 6.1; rv:70.0) Gecko/20100101 Firefox/70.0
Firefox 70
Windows 7
Desktop
5 years ago
Test name Executions per second
getElementById 6258399.5 Ops/sec
getElementsByTagName 3482736.5 Ops/sec
querySelector 3805195.2 Ops/sec
getElementsByClassName 3295304.2 Ops/sec
getElementsByName 4287854.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName