octave-maintainers
[Top][All Lists]
Advanced

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

Re: Significant speed-up of datevec


From: Daniel J Sebald
Subject: Re: Significant speed-up of datevec
Date: Thu, 18 Dec 2008 22:35:18 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

John W. Eaton wrote:
On 18-Dec-2008, Jaroslav Hajek wrote:

| I applied this patch. If you intend to make more than a few
| contributions to Octave, please consider making yourself familiar with
| Mercurial and then using it to create, organize and send patches.

These latest two changes should have ChangeLog entries.

Also, what is the purpose of this change in unique.m?

  -  ## I don't know why anyone would need reverse indices, but it
  -  ## was an interesting challenge.  I welcome cleaner solutions.
     if (nargout >= 3)
       j = i;
  -    j(i) = cumsum (prepad (! match, n, 1));
  +    j(i) = cumsum ([1 !match]);

Simply to avoid calling an additional script file.  In this case we know
the array is one element short.  Here's a comparison of before/after
with that simple test function I sent.

octave:4> testfunc3();
ans =  12.332
octave:5> clear all
octave:6> testfunc3();
ans =  6.0351
octave:7>


Also, if it is not already in the the coding standards, I think we
should add something saying that elements in matrices, cell arrays,
and lists of values returned from functions should be separated by
commas (or semicolons) not just whitespace.

OK.  I see Jaroslav has it cover; thanks.

Dan


reply via email to

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