Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:64.0) Gecko/20100101 Firefox/64.0
Firefox 64
Mac OS X 10.13
Desktop
5 years ago
Test name Executions per second
getElementById 3065369.2 Ops/sec
getElementsByTagName 1769866.4 Ops/sec
querySelector 1918489.9 Ops/sec
getElementsByClassName 1708862.0 Ops/sec
getElementsByName 2812994.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName