Run details:
Mozilla/5.0 (Linux; Android 10; SAMSUNG SM-G965F) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/13.2 Chrome/83.0.4103.106 Mobile Safari/537.36
Chrome Mobile 83
Android
Mobile
3 years ago
Test name Executions per second
getElementById 1259908.0 Ops/sec
querySelector 643985.2 Ops/sec
getElementsByClassName 966184.5 Ops/sec
querySelectorAll 403723.6 Ops/sec
querySelector class 986392.8 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class