Run details:
Mozilla/5.0 (Linux; Android 11; SM-A505FN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.66 Mobile Safari/537.36
Chrome Mobile 90
Android
Mobile
3 years ago
Test name Executions per second
getElementById 1556439.8 Ops/sec
getElementsByTagName 900050.9 Ops/sec
querySelector 805459.3 Ops/sec
getElementsByClassName 886612.8 Ops/sec
getElementById unique 1264237.0 Ops/sec
querySelector (unique id) 710213.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementById unique

  • querySelector (unique id)