Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Chrome 112
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
getElementById 9396974.0 Ops/sec
querySelector 5494652.0 Ops/sec
getElementsByClassName 7395497.5 Ops/sec
querySelectorAll 3049252.2 Ops/sec
querySelector class 6753434.5 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class