Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0
Firefox 75
Ubuntu
Desktop
4 years ago
Test name Executions per second
getElementById 5285862.5 Ops/sec
getElementsByTagName 2775722.5 Ops/sec
querySelector 2836579.8 Ops/sec
getElementsByClassName 2591734.5 Ops/sec
getElementsByName 3484503.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName