Mail Archives: djgpp/1997/02/05/02:44:41
Leath Muller wrote:
>
> Ok, lets try again... :)
>
> > > Can we *please* kill this myth.
> > > On Pentium there is NO speed difference between using a float or double.
> > > On 387,486/487 float is slightly *faster* to load, store or read from
> > > ram as an operand, than a double.
>
> > Myth ? which myth? This is true.
> > Try this :
>
> Its not a myth... see the following...
>
> [big snip...]
>
> > On my 486dx75, this program prints "20 12", which means the calculation
> > in floats is about twice slower than the calculation in doubles.
>
>
> Don't take this badly or the wrong way or anything, I say this nicely:
> If you don't have a pentium, don't say anthing. :) Its REALLY REALLY
> simple.
>
> ON THE PENTIUM: ALL FLOATS AND DOUBLES ARE CONVERTED TO 80 BIT VALUES
> BY THE FPU BEFORE THE CALCULATION, CALCULATED IN 80 BIT, AND THEN STORED
> IN ITS ORIGINAL RESOLUTION (FLOAT/DOUBLE). THIS TAKES *NO* TIME ON A
> PENTIUM.
>
Just for fun:
I have checked the code of Francois Charton on my P100 system
it printed: 30 21
your code produced a GPF under Win95's in the DOS window
Andras
- Raw text -