Hi,

Your results may be skewed. If you are dividing integers by 2 it's not
the same as multiplying an integer by 0.5. In the first case, you are
performing an integer division, whereas in the second case you are
performing a floating point operation (which results in the end in a
cast back to integer.)

If that's what you did, testing operations on an integer, then the
result is not surprising.

On Wed, May 20, 2009 at 12:33 PM, Robert Green <rbgrn....@gmail.com> wrote:
>
> I thought others would find this really useful so I posted my FPS
> counter app that lets you throw whatever code in the draw loop and
> prints out an average of the last 10 frames FPS.  I used this to find
> out that dividing by 2 is over twice as fast as multiplying by .5,
> which is something 2D games do a lot to work with sprite positions.
>
> Here is my code for all of you to share and be plentiful with:
>
> http://www.rbgrn.net/content/286-how-to-test-android-performance-using-fps
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to