Date: Sun, 16 Jun 1996 09:47:37 +0200 (IST) From: Eli Zaretskii To: Shawn Hargreaves Cc: djgpp AT delorie DOT com Subject: Re: Speed optimization: memcpy() or for loop ?? In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 13 Jun 1996, Shawn Hargreaves wrote: > I think you people are seriously underestimating the power of gcc's > optimiser. It is _good_ :-) Tricks like this may occasionally gain a slight > speed increase, but in most cases gcc will do them for you if you just > write your loop in the simple and obvious way. Making something this > complicated can even be counterproductive: it obscures what you are > trying to do, so the optimiser is less likely to figure out ways to make it > faster. The usual way to optimise the program is to make it work right, then to profile it, and only *then* to optimise the fragments that appear as ``hot spots'' in the profile. > You wouldn't be an ex-Borland user, by any chance? I notice people who > have used Borland usually have a hard time trusting the compiler to produce > good code without lots of help :-) Even this seems to be not true since BC 3.x.