delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/31/10:55:21

From: frabb AT worldaccess DOT nl
Newsgroups: comp.os.msdos.djgpp
Subject: Antw: Re: doubles vs. floats
Date: Fri, 31 Jan 97 11:14:49 GMT
Organization: World Access
Lines: 20
Message-ID: <N.013197.121449.51@grn1-6.worldaccess.nl>
References: <199701292356 DOT SAA28049 AT delorie DOT com>
NNTP-Posting-Host: grn1-6.worldaccess.nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

frabb AT worldaccess DOT nl wrote:

> 
> #define noTYPE float       /* 150 ticks (40) */
> #define noTYPE double      /* 170 ticks (40) */
> #define TYPE long double   /* 195 ticks (46) */
> 
> 
> The three lines specifying TYPE as float, double or long double also contain 
> the number of clockticks used by the program. It appears that float is faster 
> than double is faster than long double. The program is compiled using RHIDE.
> What worries me even more is the number between ( ), this is obtained by 
> compiling the program with TC...

Dear Frank, you should have a look at the CLOCKS_PER_SEC definition, which is 
5x18.2 in gcc, instead of 18.2 in tc. That makes the gcc version a lot faster 
than the tc version. It does not change the problem of float being the fastest!

Frank.

- Raw text -


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