Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:48.0) Gecko/20100101 Firefox/48.0
Firefox 48
Mac OS X 10.6
Desktop
5 years ago
Test name Executions per second
getElementById 4214277.0 Ops/sec
getElementsByTagName 1526193.4 Ops/sec
querySelector 1464453.8 Ops/sec
getElementsByClassName 1457732.1 Ops/sec
getElementsByName 2104388.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName