|
Rockbox mail archiveSubject: Re: Re: 3D Cube screensaver - useless but niceRe: Re: 3D Cube screensaver - useless but nice
From: Christophe Avoinne <christophe.avoinne_at_laposte.net>
Date: Tue, 15 Oct 2002 00:22:02 +0200 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 > Received on 2002-10-15 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |