Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0
Firefox 66
Linux
Desktop
5 years ago
Test name Executions per second
getElementById 4702134.5 Ops/sec
getElementsByTagName 2889989.0 Ops/sec
querySelector 3147031.8 Ops/sec
getElementsByClassName 2792158.2 Ops/sec
getElementsByName 4769420.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName