Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36
Chrome 98
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
form.elements 2363491.8 Ops/sec
getElementsByTagName 2747470.0 Ops/sec
querySelectorAll 1405605.9 Ops/sec
getElementsByClassName 2888931.8 Ops/sec
getElementsByName 3173155.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • form.elements

  • getElementsByTagName

  • querySelectorAll

  • getElementsByClassName

  • getElementsByName