From: "A. Sinan Unur" 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Robert Blum wrote: > > jon 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. *******************************************************************