All together now ;-)

Andreas Raab andreas.raab at gmx.de
Tue Mar 28 21:19:24 UTC 2006


Bryce Kampjes wrote:
> P.S. Andreas, I sent this directly to you by mistake. I meant
> to send to the list.

Well, then here's my reply to the list:

 > How does your new FloatMathPlugin work with the existing floating
 > point? Is it meant to replace all other floating point calculations?

If you mean basic operations like add, subtract, divide, multiply by 
"all other calculations", then no. FloatMathPlugin includes only the 
following functions: acos, acosh, asin, asinh, atan, atan2, atanh, cos, 
cosh, exp, fmod, modf, hypot, log10, log, sin, sinh, sqrt, tan, tanh, ldexp.

 > I can see how that would be advantageous for some applications but for
 > others the speed of hardware floating point may be more important.

With the exception of sqrt I have found the functions in fdlibm to be 
exceedingly fast (to the point of performing on par or better with the C 
library functions when compiled in a static C program, e.g., not 
counting any additional overhead for allocation etc). And sqrt is 
(fortunately) fairly well-defined so that (on Intel at least) we can use 
the hardware fsqrt instead of the fdlibm version. I'm hoping that this 
will be true in general (but we'll find out soon).

 > OK, for now, the library you're using may be as fast as the
 > interpreter but adding some basic floating point support to Exupery
 > would be fairly easy.

Basic floating point support would not speed up any of the above 
functions. Neither do the above functions do basic floating point 
support. These issues are fairly unrelated.

Cheers,
   - Andreas




More information about the Vm-dev mailing list