Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:81.0) Gecko/20100101 Firefox/81.0
Firefox 81
Mac OS X 10.13
Desktop
4 years ago
Test name Executions per second
getElementById 7051869.5 Ops/sec
getElementsByTagName 3704174.8 Ops/sec
querySelector 3910861.0 Ops/sec
getElementsByClassName 3469037.2 Ops/sec
getElementsByName 4062069.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName