Re: Optmization

From: Malcolm (malcolm_at_55bank.freeserve.co.uk)
Date: 12/18/03


Date: Thu, 18 Dec 2003 21:53:21 -0000


"E. Robert Tisdale" <E.Robert.Tisdale@jpl.nasa.gov> wrote in message
>
> Don't modify your source code
> to enhance performance or reduce code size.
>
What you've got to remember is that programmer time is typically far more
expensive than CPU time. A one second speed-up has got to be executed many
many times before it repays the cost of coding it.
>
> Learn how to use your compiler's optimization options
> and, if that isn't sufficient, shop around
> for a better optimizing compiler.
>
This is semi good advice. Firstly, algorithmic optimisation is very often
worthwhile, whilst micro-optimisation, which Robert is talking about,
frequently isn't. Buying a better compiler for a hundred quid is probably
far cheaper than spending the week trying to make the thing run faster.
However often you will have a definite target platform, and be forced to use
one compiler (this is typically the case in games). Then it can be
worthwhile to micro-optimise.
>



Relevant Pages

  • Re: Can you write code directly in CIL ???
    ... IL is based on a pure stack based virtual machine execution ... >>> and here is what the JIT compiler actually generated from this (!! ... >> Show me the source code. ... >> the difference between optimized code and code compiler with optimization ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Zero Optimization and Sign Optimization???
    ... I am talking about source code; ... mentioning a programming language or that a compiler would be ... I was thinking of the sort of optimization ...
    (comp.lang.c)
  • Re: Process memory settings
    ... the the source code is ok and compiler optimization can be done. ... COBOL compiler is quite different than the Alpha COBOL compiler. ...
    (comp.os.vms)
  • Re: AVR compilers
    ... The unfortunate thing is that ... > the source code optimized for compiler A may be pessimized ... > for compiler B, so making such comparisons is difficult. ... and optimization left to the code generator. ...
    (comp.arch.embedded)
  • Re: Brian Kernighan, maybe Im not worthy, maybe Im scum
    ... what experienced programmers do, ... optimization, ... Thugs" ad nauseum fits that a lot more closely than discussing compiler ... be modified outside a loop, and guessing ...
    (comp.programming)