Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Linux
Desktop
one year ago
Test name Executions per second
getElementById 4649858.0 Ops/sec
querySelector 2586089.8 Ops/sec
getElementsByClassName 3631021.8 Ops/sec
querySelectorAll 1440786.5 Ops/sec
querySelector class 3615958.0 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class


;