[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [slightly OT]: Octave featured in Free Software magazine
From: |
David Bateman |
Subject: |
Re: [slightly OT]: Octave featured in Free Software magazine |
Date: |
Tue, 05 Jun 2007 22:00:59 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (X11/20060921) |
Alexander Barth wrote:
> Hi Jordi,
> Thank you for pointing this benchmark out.
>
> Octave's speed can be improved quite significantly if lines like:
>
> qgtfive= find(qRe > 5.);
> zRe(qgtfive)=5.;
>
> are replaced by:
>
> zRe(qRe > 5.)=5.;
>
> The code is also much clearer this way.
> On my machine (AMD Opteron 244):
>
> octave:1> tic; fractal_benchmark; toc
> Elapsed time is 24.935944 seconds.
> octave:2> tic; fractal_benchmark2; toc
> Elapsed time is 14.843300 seconds.
I got much the same results for this
>
> In addition to this, the complex type can be used instead of real and
> imaginary part separately.
though this doesn't help as the bizarre limit separately on the real and
imaginary parts of z to be in [-5,5] mean that the you have to go back
to real and imaginary parts to apply the limits to z..
D.