Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Chrome 125
Linux
Desktop
6 months ago
Test name Executions per second
getElementById 3639497.8 Ops/sec
querySelector 2112603.2 Ops/sec
getElementsByClassName 2787169.0 Ops/sec
querySelectorAll 1124596.5 Ops/sec
querySelector class 2549672.2 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class