Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 OPR/58.0.3135.127
Opera 58
Mac OS X 10.13.4
Desktop
5 years ago
Test name Executions per second
getElementById 3931690.2 Ops/sec
getElementsByTagName 1569293.0 Ops/sec
querySelector 1874326.1 Ops/sec
getElementsByClassName 1643075.8 Ops/sec
getElementsByName 1900012.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName