----- Original Message ----- From: "Dan Patrutiu" <[EMAIL PROTECTED]>
> I have somewhere in the code the following line: > > int dist=sqrt(dx*dx+dy*dy); > > I also heard that it's not a good idea to do 32 bit multiplies , so I > changed the types of dx and dy to short ... ( I use 4 bytes integers). When > I disassemble the debug code, I see that "muls" instructions are generated > (correct), but when I compile it into release and disassemble it again, the > generated instructions are "jsr __lmul__", which eat many more cycles, > as I understood. How can I correct this ? I also made such experience - it is a CW optimizer bug. Try switching off common subexpression elimination, e.g. with the pragma opt_common_subs. Jan Slodicka -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
