From: "Eyal Ben-David" To: djgpp AT delorie DOT com Message-ID: Date: Tue, 13 May 1997 16:35:32 +0300 Subject: Re: Any tips on optimizing C code? Mime-Version: 1.0 Content-type: text/plain; charset=US-ASCII Precedence: bulk Robert Blum Wrote: >After that: Profile, profile, profile. >90% of a programs runtime are spent in 5%-10% of its code. So there's no need to >optimize the rest. This is the most important fact about good performance programs. Usually it is done later in the developing cycle. At the first stages of program development, it is better to pay attension to design i.e. readability of the code, flexibility etc. In many cases these factors are more important than performance. Good design and modularity will help later to locate some performance bottlenecks and correct them. It is better at start to find good high level algorithms. Nothing will help if the high level algorithms are bad. It is quite language independent. for more information read "More effective C++" by Scott Meyers. He devotes a chapter for efficiency and although the language is C++, many topics are language independent. Eyal.