Outerheight vs OffsetHeight

Benchmark created on


Preparation HTML

<div id="test"></div><script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Setup

var $t = $('#test');
    var t = $('#test')[0];

Test runner

Ready to run.

Testing in
TestOps/sec
outerHeight
$t.outerHeight(true);
ready
native outerheight
var styles = getComputedStyle(t);
t.offsetHeight + styles.getPropertyValue("margin-top") + styles.getPropertyValue("margin-bottom")
ready

Revisions

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