delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/14/15:52:18

From: "A. Sinan Unur" <asu1 AT cornell DOT edu>
Newsgroups: comp.os.msdos.djgpp,rec.games.programmer
Subject: Re: Any tips on optimizing C code?
Date: Tue, 13 May 1997 09:00:00 -0400
Organization: Cornell University http://www.cornell.edu
Lines: 26
Sender: asu1 AT cornell DOT edu (Verified)
Message-ID: <337865D0.FB8@cornell.edu>
References: <33775c59 DOT 19219875 AT news DOT cis DOT yale DOT edu> <01bc5f6f$c3000be0$cf1afec3 AT robert>
Reply-To: asu1 AT cornell DOT edu
NNTP-Posting-Host: cu-dialup-0069.cit.cornell.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Robert Blum wrote:
> 
> jon <quacci AT vera DOT com> wrote
> > I'm interested in understanding what can be done to speed up straight
> > C code. In the specific thing I am writing, I've already done the
> > obvious things, like switched most calcs from FP to integer, using bit
> > shifting wherever possible for multiplying and dividing, etc.
> 
> Duh.. That must have been from a very old source of information. On 
> the Pentium (I assume you use one), FP is even faster than integer 
> performance.

actually, that has been so since the 486. michael abrash wrote about his
experience in dr dobbs some time ago. anyway, the moreal of the story is
"measure before you optimize".
-- 
   Sinan
 
*******************************************************************
 A. Sinan Unur                                WWWWWW
                                              |--O+O
 mailto:sinan DOT unur AT cornell DOT edu                C   ^ 
 http://www.people.cornell.edu/pages/asu1/     \  ~/ 

Unsolicited e-mail is _not_ welcome, and will be billed for.
*******************************************************************

- Raw text -


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