octave-maintainers
[Top][All Lists]
Advanced

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

Re: Assignment fails, crash


From: Jarno Rajahalme
Subject: Re: Assignment fails, crash
Date: Tue, 11 May 2010 09:55:30 -0700

On May 10, 2010, at 10:11 PM, ext Judd Storrs wrote:

> On Mon, May 10, 2010 at 11:37 PM, Jarno Rajahalme
> <address@hidden> wrote:
>> I would really appreciate if someone knowledgeable would comment on this. I 
>> would hate to go back to 3.2.3 because of this, the dev branch seems to be 
>> about 4x faster on my code...
> 
> As a workaround you may be able to use logical indexing directly
> instead of running find() on it. If you're using find() as a
> performance hack like I used to, you'll find this is substantially
> faster than it used to be. After the recent improvements I haven't
> been able to beat using the logical matrix directly for the things I
> do. I don't know how abstracted the bug report is from your code
> though so clearly YMMV. For my cases find() was actually the
> workaround and logical indexing was what I was really after anyway.
> 
> octave:1> testdata([1:2] != 0) = [1:2]
> testdata =
>   1   2
> 

Thanks for the tip. I actually did not know indexing with logicals like that 
would be possible at all :-) And yes, it seems to be somewhat faster too.

  Jarno


reply via email to

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