Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox 71
Windows
Desktop
5 years ago
Test name Executions per second
getElementById 8750740.0 Ops/sec
getElementsByTagName 4781879.0 Ops/sec
querySelector 5377017.0 Ops/sec
getElementsByClassName 4566217.5 Ops/sec
getElementsByName 5520068.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName