optimization tricks ?
Tue May 16 18:28:23 CEST 2000
> Date: Mon, 15 May 2000 10:32:01 +0100
> From: Francesco Cesarini <cesarini@REDACTED>
> X-Accept-Language: en
> MIME-Version: 1.0
> To: erlang-questions@REDACTED
> CC: Hakan Stenholm <etxhste@REDACTED>
> Subject: Re: optimization tricks ?
> Content-Transfer-Encoding: 8bit
> Erlang methodology:
> 1. First make it work
> 2. Then make it beautiful
> 3. Then [if you *really* *really* have to] make it fast [keeping it
> beautiful and correct].
I agree that point 1 and 2 generaly are sufficent but ocasionaly point 3 will
rear it's ugly head and it might be usefull to know what to do in these cases.
It does also seam to me that if one knowns the behaviour (bugs, Ordos of
operations ...) of different language constructs and libraries, that one often
will be able to write better/faster/stabler/more butiful code if one is aware of
the shortcomings and advantages of different solutions.
My main purpouse of asking wasn't becouse I wanted to do a lot of optimization
(that will be something to look into if things go to slowly) but rather to get a
grasp of what can be done in the way of optimization if one has to do it and
what returns in terms of speed (and memory usage) one can expect.
> In 9 cases out of 10, you will realize you do not need step 3 as the
> application runs fast enough. In the 10th case, you probably won't have
> time for the third step.
> Hakan Stenholm wrote:
> > I'm currently working on a strategy game in my spare time (i.e. not a
> > large distributed real time system) and have spent some time wondering
> > about how to write efficent (speed and memory vise) erlang code.
> > Håkan Stenholm
> Francesco Cesarini
> Erlang/OTP consultant
> Cellular: +44-(0)7776 250381
> ECN: 832-707192
More information about the erlang-questions