Mail Archives: djgpp/1996/12/23/01:48:12
On Sun, 22 Dec 1996, Francois Charton wrote:
> BTW, I noticed one funny thing when working on this example:
> if, instead of "doubles", I use floats (32 bit, lower precision, better
> aligned...), mycos() runs slower... It seems to be due to the FPU, which
> loses time converting floats to ints.
>
> Is it DJGPP specific, or common to any "Intel Inside" (you have been
> warned) machine?
As far as I know, FP code will indeed run slower when you use floats due
to some extra conversions in some cases. You have probably hit one of
them. But to be sure you need to look at the assembly code emitted by
the compiler and count cycles.
- Raw text -