help-octave
[Top][All Lists]
Advanced

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

RE: matlab/octave performance hit


From: Victor Zhorin
Subject: RE: matlab/octave performance hit
Date: Thu, 18 Oct 2007 16:27:24 -0500

Yes, it is actually a limiting case, leading to a factor of roughly 10 in total run time but I see the point.
Large arrays, small number of function calls is good, small arrays, many calls - not so.

Your sample has a factor of 4 in comparison test runs, which is on the same sclale.
We would have to live with this, it seems.

Thanks.
Victor


-----Original Message-----
From: David Bateman [mailto:address@hidden]
Sent: Thu 10/18/2007 4:04 PM
To: Victor Zhorin
Cc: address@hidden
Subject: Re: matlab/octave performance hit

Victor Zhorin wrote:
> Hello,
>
> We tried to see whether we could make existing matlab code to run using
> octave on parallel cluster.
> Unfortunately we found that performance hit is too strong.
>
> It seems that slowness is most likely due to some instrinsic
> system/octave  issues.
>
> Here is a quick example:
>
> tic; test = 1:200; nc = cumsum(test);toc
>
> octave (linux based box, latest release compiled)
> Elapsed time is 0.023521 seconds.
> matlab (mac, powerpc)
> Elapsed time is 0.000064 seconds.
> octave (same mac, latest binary package for Mac X installed as-is)
> Elapsed time is 0.050179 seconds.
>
>

What you don't have time to go and make a coffee in 0.05sec? There is an
intrinsic overhead in a function call that is larger than in matlab and
so this is the limiting case in the above. Try

tic; test=1:1e6;cumsum(test);toc

instead as a test case.. I can't imagine that the above is a limiting
case for your run..

D.


reply via email to

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