Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0
Firefox 70
Ubuntu
Desktop
5 years ago
Test name Executions per second
getElementById 7093239.0 Ops/sec
getElementsByTagName 3652768.2 Ops/sec
querySelector 3873574.5 Ops/sec
getElementsByClassName 3437925.5 Ops/sec
getElementsByName 4379313.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName