Regis St-Gelais wrote:
"Luc Le Blanc" <[EMAIL PROTECTED]> a écrit dans le message de news: [EMAIL PROTECTED]
Maybe someone knows (perhaps Ben ;) about the optimization of float operations under CodeWarrior 9.3:

Is dividing by 100.0 as fast (or slow) as multiplying by 0.01 ?

Is multiplying by 1.0 costlier than checking for == 1.0 (and then not multiplying) ?

I am trying to speed up a graph draw procedure that involves a lot of computations.


--
Luc Le Blanc


Luc,

In general, when you can afford the range limitation, its mutch faster to use offsetted (or scalled) integers.


I use shifted integers whenever I can, but no, here I need the precision, hence my use of floats. I know divisions tend to be costlier than multiplications, but I was wondering whether any optimization is performed.



--
Luc Le Blanc

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to