X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Kelsey Bjarnason Subject: Re: gcc 2.953 output - is this a bug? Newsgroups: comp.os.msdos.djgpp,comp.lang.c Message-ID: References: <3C61E6BB DOT 7F9AD526 AT yahoo DOT com> <87d6zim2vy DOT fsf AT pfaff DOT stanford DOT edu> <3C620456 DOT 967C433F AT yahoo DOT com> User-Agent: Pan/0.11.1.91 (Unix) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Comment-To: "CBFalconer" Lines: 17 Date: Tue, 12 Feb 2002 09:05:01 GMT NNTP-Posting-Host: 216.232.62.170 X-Trace: news0.telusplanet.net 1013504701 216.232.62.170 (Tue, 12 Feb 2002 02:05:01 MST) NNTP-Posting-Date: Tue, 12 Feb 2002 02:05:01 MST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com [snips] On Wed, 06 Feb 2002 20:51:47 -0800, CBFalconer wrote: > Thanks. If I had a handy x86 manual I *might* have eventually figured > it out. Incidentally, I found that gcc generated better code for: > > h = h * 31UL + *string++; > than for: > h = (h << 5) - h; > h += *string++; > > the latter used an additional temporary. Which proves something or > other. That once again, "Optimize your algorithms, not your source code" is wisdom to live by? :)