Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox 71
Mac OS X 10.14
Desktop
5 years ago
Test name Executions per second
getElementById 7481186.5 Ops/sec
getElementsByTagName 3925086.8 Ops/sec
querySelector 3777160.2 Ops/sec
getElementsByClassName 3570229.0 Ops/sec
getElementsByName 4598610.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName