help-octave
[Top][All Lists]
Advanced

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

Re: matlab/octave performance hit


From: John W. Eaton
Subject: Re: matlab/octave performance hit
Date: Mon, 22 Oct 2007 07:46:39 -0400

On 22-Oct-2007, David Bateman wrote:

| David Bateman wrote:
| > John could we and should we try to intercept tic/toc and cputime in the
| > parser and hand the calculation off immediately to builtin versions of
| > these functions like the attached?
| >   
| No need to change the parser. I just tried the attached patch that makes
| tic, toc and cputime built-in functions.. The speed is then
| 
| octave:1> tic; toc
| Elapsed time is 2.00272e-05 seconds.
| 
| and for the cumsum problem of Victor
| 
| octave:2> t=1:200;tic;cumsum(t);toc
| Elapsed time is 0.000160933 seconds.
| octave:3> t=1:200;tic;cumsum(t);toc
| Elapsed time is 8.39233e-05 seconds.
| 
| Note the slower first call. This is much more acceptable.. It seems that
| the function table code in Octave 2.9.x is slow except for builtins
| (note cumsum is a built-in).. I wonder what the object branch with its
| changed function table code can make of this issue. In any case, I'd
| suggest applying the attached patch, to avoid as many as possible the
| "Octave is too slow" comments..

Please check in this change.

Thanks,

jwe


reply via email to

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