Reply-To: From: "Arthur" To: "DJGPP Mailing List" Subject: RE: Floating/fixed point Date: Sat, 19 Sep 1998 19:02:48 +0100 Message-ID: <000001bde3f7$b5dc8fc0$9f4e08c3@arthur> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit In-Reply-To: Importance: Normal Precedence: bulk > > 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