Run details:
Mozilla/5.0 (Linux; Android 8.0.0; ASUS_X00PD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Mobile Safari/537.36
Chrome Mobile 87
Android 8.0.0
Mobile
3 years ago
Test name Executions per second
getElementById 440809.3 Ops/sec
getElementsByTagName 271200.3 Ops/sec
querySelector 281873.5 Ops/sec
getElementsByClassName 269552.7 Ops/sec
getElementsByName 251755.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName