delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/21/01:59:13

From: leathm AT solwarra DOT gbrmpa DOT gov DOT au (Leath Muller)
Message-Id: <199701202306.JAA04467@solwarra.gbrmpa.gov.au>
Subject: Re: floating point is... fast???
To: chambersb AT juno DOT com (Benjamin D Chambers)
Date: Tue, 21 Jan 1997 09:06:23 +1000 (EST)
Cc: djgpp AT delorie DOT com
In-Reply-To: <19970120.094829.4983.1.chambersb@juno.com> from "Benjamin D Chambers" at Jan 20, 97 12:49:20 pm

> >Yes, floating point is faster because imul and idiv use the floating
> >point unit to do the operations - thus an integer mul/divide has the
> >overhead of converting the int -> float, div/mul, then float -> int.
> >Whereas the floating point calculations just do the div/mul...
 
> If this were true, I couldn't do ANY multiplication/division on my
> computer, since I have no FPU (I'm not counting Emulators here).
> The integer mul/div routines are so slow precisely *because* they do not
> use the FPU - they use the integer unit, which was not made for
> mul/div's.

Oops, sorry - sometimes I forget everyone doesn't have a Pentium... :)

Leathal.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019