delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/13/09:38:25

From: "Eyal Ben-David"<Eyal_Ben-David AT aks DOT com>
To: djgpp AT delorie DOT com
Message-ID: <C2256496.00426F51.00@aks.com>
Date: Tue, 13 May 1997 16:35:32 +0300
Subject: Re: Any tips on optimizing C code?
Mime-Version: 1.0



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.


- Raw text -


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