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: Jaroslav Hajek
Subject: Re: Significant speed-up of datevec
Date: Thu, 18 Dec 2008 21:00:08 +0100

On Thu, Dec 18, 2008 at 8:55 PM, John W. Eaton <address@hidden> 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.
>

Uh, sorry, I forgot about those. I'll add them.

> 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]);
>

I think match is always of length n-1 here, isn't it? If yes, then the
latter seems clearer to me, and likely also faster.

>
> 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.


> jwe
>



-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz


reply via email to

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