Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4109.0 Safari/537.36 Edg/84.0.485.0
Chrome 84
Mac OS X 10.15.4
Desktop
4 years ago
Test name Executions per second
querySelectorAll 207570.1 Ops/sec
getElementsByTagName 256104.4 Ops/sec
getElementsByTagName ArrayFrom 245317.0 Ops/sec
getElementsByTagName ForLoop 836357.6 Ops/sec
getElementsByTagName ArrayFilterForEach 184236.4 Ops/sec
getElementsByTagName ArrayFilterMap 186223.5 Ops/sec
HTML Preparation code:
Tests:
  • querySelectorAll

  • getElementsByTagName

  • getElementsByTagName ArrayFrom

  • getElementsByTagName ForLoop

  • getElementsByTagName ArrayFilterForEach

  • getElementsByTagName ArrayFilterMap