Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Chrome 55
Windows 7
Other
7 years ago
Test name Executions per second
form.elements 316374.4 Ops/sec
getElementsByTagName 333288.3 Ops/sec
querySelectorAll 238212.3 Ops/sec
getElementsByClassName 324486.0 Ops/sec
getElementsByName 333959.7 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • form.elements

  • getElementsByTagName

  • querySelectorAll

  • getElementsByClassName

  • getElementsByName