[Icc-avr] Saving floating point constants in flash
bobgardner at aol.com
bobgardner at aol.com
Fri Aug 15 10:54:12 PDT 2008
Consider 'assigning' an integer to an fp var like x=3; or using integer numbers in an fp expression like y=13x+7;
I notice that the compiler loads the int and calls int2fp. I assume loading the float constants from flash must surely be faster than calling a subroutine, so adding a decimal point in that expression like this y=13.0*x+7.0; should load the fp numbers from flash. If I use a number like 13.0 several times, does the compiler keep track of all the fp constants and reuse them when possible? Trying to squeeze 10 lbs of stuff into a 5lb bag.....
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-avr/attachments/20080815/cd5f951b/attachment.html
More information about the Icc-avr
mailing list