document.head vs getElementsByTagName

Benchmark created by Andreas Goebel on


Test runner

Ready to run.

Testing in
TestOps/sec
document.head
var head = document.head;
ready
getElementsByTagName
var head = document.getElementsByTagName( 'head' )[ 0 ];
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.

  • Revision 1: published by Andreas Goebel on
  • Revision 3: published on
  • Revision 4: published by r on
  • Revision 5: published by Konstantin Tarkus on