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 3933763.8 Ops/sec
getElementsByTagName 2307129.0 Ops/sec
querySelector 2366433.8 Ops/sec
getElementsByClassName 2375762.8 Ops/sec
getElementsByName 2986750.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName