www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/06/14:58:30

From: elf AT netcom DOT com (Marc Singer)
Message-Id: <199702061945.LAA16451@netcom4.netcom.com>
Subject: FYI: performance of float vs. int
To: djgpp AT delorie DOT com (DJGPP List Alias)
Date: Thu, 6 Feb 1997 11:45:18 -0800 (PST)
MIME-Version: 1.0

I know that there have been many messages posted to this list about
the relative performance characteristics of integer and floating point
math.  I would like to forward two comments.

I have been working on an implementation of a DCT (discrete cosine
transform) and have found the suprising results that the fixed point
integer version is slower than the floating point version on both on a
486 and on a P5.  I am not claiming that this will always be the case,
but I was astonished to find that the fixed point version was twice as
slow as the floating point implementation.  I intend to look into this
more and will post again when I have a conclusion.

The other interesting thing is that I got around to watching a video
tape of Michael Abrash talking about the Quake engine.  He said that
on the Pentium, floating point was much faster and it solved several
problems at once.  They use an FDIV in the inner loop of the renderer
and it costs them one cycle.  He also pointed out that using floating
point has the extra advantage on the x86 architecture of freeing
integer registers.

-- Marc Singer

- Raw text -


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