Scroll vs css translate3d (v22)

Revision 22 of this benchmark created on


Preparation HTML

<style>

#outer{
width:100px;
height:100px;
overflow:hidden;
outline:1px dotted blue;
}
</style>

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

Setup

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

Test runner

Ready to run.

Testing in
TestOps/sec
scrollLeft
o.scrollLeft = 100 * Math.random();
ready
style.transform
var c = 'translateX(' + 100 * Math.random() + 'px)';
is.transform = c;
ready

Revisions

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