Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Re: 3D Cube screensaver - useless but nice
From: Christophe Avoinne (christophe.avoinne_at_laposte.net)
Date: 2002-10-15


Why on earth do you use 1000000 instead of a power of 2 !? using decimal
multiplication or division are, sorry to say, very stupid and very slow even
with integer. Just use a 16.16 fixed point integer, so you can replace
*1000000 and /1000000 by <<16 (i.e, *65536) and >>16 (i.e, /65536) would
dramastically speedup your calculations.

----- Original Message -----
From: "Damien Teney" <dteney_at_hotmail.com>
To: <rockbox_at_cool.haxx.se>
Sent: Monday, October 14, 2002 9:33 PM
Subject: Re: Re: 3D Cube screensaver - useless but nice

> I improved my code as you told me: now I just have one table with the sine
> from 0 to 90 degrees.
> However, Daniel suggests to avoid floats and to use integers numbers, and
I
> tried to do this: the sine table was an int table with the sine * 1000000,
> and when it needed a sine, I took the element of the table / 1000000.
> Furthermore, the size of the compiled module is still quite big :-(
>
> -------------------------
> D a m i e n T e n e y
>
> dteney_at_hotmail.com
>
> http://www.mcarsweb.com
> -------------------------
>
>
> _________________________________________________________________
> Affichez, modifiez et partagez gratuitement vos photos en ligne:
> http://photos.msn.com/support/worldwide.aspx
>



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa