Run details:
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36 OPR/68.0.3618.206
Opera 68
Windows
Desktop
3 years ago
Test name Executions per second
querySelector 2840223.0 Ops/sec
querySelectorAll 1204769.5 Ops/sec
getElementsByClassName 3287365.0 Ops/sec
querySelector (ID) 2014137.2 Ops/sec
getElementsByID 3541968.5 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;