Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0
Firefox 64
Ubuntu
Desktop
5 years ago
Test name Executions per second
getElementById 3716805.2 Ops/sec
getElementsByTagName 2046230.4 Ops/sec
querySelector 2193899.8 Ops/sec
getElementsByClassName 1943032.9 Ops/sec
getElementsByName 3389850.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName