Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0
Firefox 83
Ubuntu
Desktop
4 years ago
Test name Executions per second
getElementById 7822251.0 Ops/sec
getElementsByTagName 6031405.0 Ops/sec
querySelector 14763441.0 Ops/sec
getElementsByClassName 5425933.0 Ops/sec
getElementsByName 8467339.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName