Document.body vs document.getElementsByTagName('body')[0] (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

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

Revisions

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