Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0
Firefox 68
Ubuntu
Desktop
5 years ago
Test name Executions per second
getElementById 3304240.2 Ops/sec
getElementsByTagName 2096576.5 Ops/sec
querySelector 2225203.0 Ops/sec
getElementsByClassName 2015201.9 Ops/sec
getElementsByName 3453280.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName