Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Ubuntu
Desktop
4 years ago
Test name Executions per second
getElementById 4195749.0 Ops/sec
getElementsByTagName 2606740.5 Ops/sec
querySelector 2596140.8 Ops/sec
getElementsByClassName 2512524.0 Ops/sec
getElementsByName 3039285.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName