Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:70.0) Gecko/20100101 Firefox/70.0
Firefox 70
Mac OS X 10.15
Desktop
5 years ago
Test name Executions per second
getElementById 8725020.0 Ops/sec
getElementsByTagName 4715310.0 Ops/sec
querySelector 5207035.5 Ops/sec
getElementsByClassName 4495225.0 Ops/sec
getElementsByName 5896226.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName