www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/12/23/01:48:12

Date: Mon, 23 Dec 1996 08:29:31 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Francois Charton <deef AT pobox DOT oleane DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: Is DJGPP that efficient?
In-Reply-To: <32BDBC44.49C6@pobox.oleane.com>
Message-ID: <Pine.SUN.3.91.961223082713.1766G-100000@is>
MIME-Version: 1.0

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 -


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