offsetWidth vs getComputedStyle (v13)

Revision 13 of this benchmark created by Master on


Preparation HTML

<div id="target">
</div>

Setup

var target = document.getElementById("target");

Test runner

Ready to run.

Testing in
TestOps/sec
Native offsetWidth
target.offsetWidth;
ready
getComputedStyle width
window.getComputedStyle(target, null).getPropertyValue('width');
ready

Revisions

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