Scroll vs css transform (v5)

Revision 5 of this benchmark created on


Preparation HTML

<style>

#outer{
width:960px;
height:960px;
overflow:hidden;
}
</style>

<div id="outer">
<img id="inner" src="https://farm8.staticflickr.com/7139/6900574562_3f979a36ff_o.jpg">
</div>

Setup

var o = document.getElementById('outer'),
    is = document.getElementById('inner').style;

Test runner

Ready to run.

Testing in
TestOps/sec
ScrollTop
o.scrollTop = 100*Math.random();
o.scrollLeft = 100*Math.random();
ready
CSS transform
is.MozTransform = 'translate(-' + 100*Math.random() + 'px,-' + 100*Math.random() + 'px)';
ready

Revisions

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