translate3d vs translate XY vs css left/top vs scrollleft
JavaScript performance comparison
Preparation code
<div id="elem" style="position: absolute; background:#ccc; width:10px; height:10px;"></div>
<script>
var elem = document.getElementById("elem");
var style = elem.style;
</script>
<div id="elem2" style="overflow:scroll;width:300px;height:300px;"></div>
<script>
var elem2 = document.getElementById("elem2");
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
translate3d |
|
pending… |
translateX/Y |
|
pending… |
css left/top |
|
pending… |
Scroll left |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by galambalazs
- Revision 2: published
- Revision 3: published
- Revision 4: published
- Revision 5: published by Dmitry
- Revision 6: published
- Revision 7: published by Disturbed
- Revision 10: published by Acap
- Revision 11: published
- Revision 13: published by Steve
- Revision 18: published
- Revision 19: published
- Revision 20: published
- Revision 22: published
- Revision 23: published by Justin
- Revision 24: published
- Revision 25: published
- Revision 26: published by David Aurelio
- Revision 27: published by ikarienator
- Revision 28: published
- Revision 29: published by atrl
- Revision 30: published
- Revision 32: published by Cameron
- Revision 35: published
- Revision 36: published
- Revision 37: published
- Revision 38: published
- Revision 39: published
- Revision 40: published by Derek Lucas
- Revision 41: published
- Revision 42: published
- Revision 43: published by Donato
- Revision 44: published by Donato
- Revision 45: published
- Revision 46: published by molant
- Revision 47: published by molant
- Revision 49: published by levinwong
- Revision 50: published by levinwong
- Revision 51: published
- Revision 52: published
- Revision 53: published
- Revision 54: published
- Revision 55: published
- Revision 56: published by dstereo
- Revision 57: published by Thomas Giles
0 comments