www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/19/14:04:27

Reply-To: <arfa AT clara DOT net>
From: "Arthur" <arfa AT clara DOT net>
To: "DJGPP Mailing List" <djgpp AT delorie DOT com>
Subject: RE: Floating/fixed point
Date: Sat, 19 Sep 1998 19:02:48 +0100
Message-ID: <000001bde3f7$b5dc8fc0$9f4e08c3@arthur>
MIME-Version: 1.0
In-Reply-To: <Pine.GSO.3.96.980918214250.10258D-100000@sutf17.reading.ac.uk>
Importance: Normal

> > I'll have to see your benchmark code to be convinced. Float-integer
> > conversion is very slow, as are if() statements. So no, people
> wouldn't use
> > fmul instead of mul.
> >
>
> But,(unless I'm mistaken) according to the intel pentium data sheet, a
> 'mul' instruction uses the FPU pipeline to execute an integer multiply;
> and then converts it back to an integer again... So why is a 'mul'
> implicity faster...

Question: why use an FPU to do integer math? I could understand using a FPU
to do divides (where there is a remainder), but why multiplications?

It's all very well having the conversion float->integer and integer->float
on a hardware level, but on a software level it can be much slower. Don't
ask me why, but it happens.

James Arthur
jaa AT arfa DOT clara DOT net
ICQ#15054819

- Raw text -


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