delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/05/11:30:42

Date: Sun, 5 Jan 1997 18:19:51 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Tony O'Bryan" <aho450s AT nic DOT smsu DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: Fixed Point (Optimization)
In-Reply-To: <32cedb2d.17212822@ursa.smsu.edu>
Message-ID: <Pine.SUN.3.91.970105181744.22565V-100000@is>
MIME-Version: 1.0

On Sat, 4 Jan 1997, Tony O'Bryan wrote:

> I did a quick check on floating point vs. integers not too long ago.
> I wrote a small loop that only added an integer to an integer counter,
> then rewrote it using floating point variables.  On my Pentium 120,
> integers were THOUSANDS of times faster.

I don't see how this can be true, even on a 486, let alone Pentium.  Look 
at the cycle counts for the operations, they only differ by a factor of 2 
to 10, definitely not thousands.

Can you post a program which exhibits the above, and the timing that you 
get on your system?

- Raw text -


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