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 5806797.5 Ops/sec
getElementsByTagName 4824527.5 Ops/sec
querySelector 6271862.5 Ops/sec
getElementsByClassName 4307800.5 Ops/sec
getElementsByName 6668367.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName