Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95
Ubuntu
Desktop
3 years ago
Test name Executions per second
getElementById 5684702.5 Ops/sec
getElementsByTagName 4738334.5 Ops/sec
querySelector 6265022.5 Ops/sec
getElementsByClassName 4201498.0 Ops/sec
getElementsByName 6852511.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName