help-octave
[Top][All Lists]
Advanced

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

Re: Random access loops performing slowly


From: David Bateman
Subject: Re: Random access loops performing slowly
Date: Mon, 15 Oct 2007 10:16:04 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Bhaskar Mehta wrote:
> Dear All,
> I have being doing some form of matrix factorization, where I iterate through 
> all non zeros of a sparse matrix
> I use find/spfind to find all non zeros and then update two separate matrices 
> with the found indices
>
> [i j vals]=find(Z);
> For k=1:length(i)
>  ## access U(i(k),:):
> ## access V(j(k),: );
> end
>
> U, V are zeros(N,2), and zeros(M,2) respectively, where size(Z) is M x N.
>
>
> Such loops such *extremely* slowly: 10 seconds on a fast server vs 0.3 
> seconds on a laptop with Matlab.
> When more than one access is made in a loop to U(i(k),:): ), the speed is 
> even slower. I have provided an example of a loop which runs even slower.
>
> I additionally get an error with octave → “error: can't perform indexing 
> operations for <unknown type> type”
>
> Can any wise guys help me with this? I would be much obliged.
> Best regards,
> Bhaskar
>
>   
>
See the thread

http://www.nabble.com/Speedup-of-random-indesing-of-sparse-matrices-%28comparison-to-scilab%29-tf4595574.html#a13123915

I believe this issue is addressed in 2.9.15.. Please try that version
and report again. Unfortunately without the input file in your example I
can't test it to prove that it is fixed..

D.


-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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