translate vs translate XY (v44)

Revision 44 of this benchmark created by Donato on


Preparation HTML

<div id="elem" style="position: absolute; background:#ccc; width:10px; height:10px;"></div>
<script>
  var elem = document.getElementById("elem");
  var style = elem.style;
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
Using Translate3d
$elem = $(elem);

for (var i = 100; i--;) {
 $elem.css("-webkit-transform", "translate3d(0, "+i+"px, 0)");
}
ready
Using Top
$elem = $(elem);

for (var i = 100; i--;) {
 $elem.css("top", i+ "px");
}
ready
translateX
 
ready

Revisions

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