help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: speed problem


From: Laurent Hoeltgen
Subject: Re: speed problem
Date: Wed, 20 Jun 2012 07:25:31 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

Hi,

On 06/20/2012 04:32 AM, elier wrote:
> Hi to everyone, I'm new using octave, I have used it for processing grayscale
> images. Now I'm traslating an old script from matlab to octave, the matlab
> is very ineficient because uses "for" to every operation. In the octave
> script I optimized some of this operations, using the find function and
> conditional matrices. I hope that the octave scripts works faster than the
> matlab one, but the take about 7 times more time. I dont know what happen.
> I hope that someone cant help me
> 

Matlab has a JIT compiler, which might (or might not) make the for loops
faster than the matrix operations in Octave. This depends on what is
being done inside the loops.

Also, matlab usually suggests to replace the find with conditional
expressions because they are often faster. I assume the same holds for
octave. If you can get rid of find, I'd try this to improve the speed.

If the code is not too long, maybe you could post it and we could give
you more suggestions on how to improve it.

Regards,
Laurent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]