jquery-height-vs-dom-offsetheight (v2)

Revision 2 of this benchmark created on


Preparation HTML

<div id="foo" style="background:green; height:156px; display:none;">
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
  </script>
  <script>
    var testDom = $("#foo")[0];
    var testJq = $("#foo");
  </script>

Test runner

Ready to run.

Testing in
TestOps/sec
height()
testJq.height();
ready
offsetHeight
testDom.offsetHeight
ready

Revisions

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