Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0
Firefox 77
Linux
Desktop
4 years ago
Test name Executions per second
getElementById 6776400.0 Ops/sec
getElementsByTagName 3529678.0 Ops/sec
querySelector 3691358.8 Ops/sec
getElementsByClassName 3271555.2 Ops/sec
getElementsByName 4064357.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName