Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Chrome 120
Linux
Desktop
one year ago
Test name Executions per second
getElementById 3769045.5 Ops/sec
querySelector 1831234.1 Ops/sec
getElementsByClassName 2570171.0 Ops/sec
querySelectorAll 1279142.9 Ops/sec
querySelector class 2926479.8 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class


;