octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #47415] out of memory negating a permutation m


From: Carlo de Falco
Subject: [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix
Date: Mon, 21 Mar 2016 10:24:27 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #11, bug #47415 (project octave):


I was considering whether it would make sense 
to add a 'sign' property to the permutation matrix 
class in order to avoid the conversion altogether.

But after running the following test:


n = 1e4;
a = eye (n);
a = a ([end 2:end-1 1], :);
typeinfo (a)
b = sparse (a);
typeinfo (b)
c = sprandn (n);
tic, a * c; toc
tic, b * c; toc
c = randn (n);
tic, b * c; toc
tic, a * c; toc


I see that matrix-matrix multiplication is 
consistently at least twice as fast with sparse
matrices than permutation matrices, so I 
think lachlan's idea makes more sense ...

c.



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47415>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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