[SciPy-dev] sparsetools - new and (hopefully) improved!
cimrman3 at ntc.zcu.cz
Tue Jan 9 09:40:07 CST 2007
Nathan Bell wrote:
> I just compiled and tested it myself. On my system it takes only
> 1/4th the time of the old method for a 1Mx1M matrix with ~5 nonzeros
> per row (2D Poisson problem w/ 5 point stencil). So it's safe to say
> it's faster :)
It's not the best implementation, either - the reorderings are done via
a temporary buffer row by row (array[i] = array_copy[permutation[i]]). A
truly in-place (cyclical) algorithm could be faster (though another
array marking already permuted items would be needed, imho), but I have
not had power to search/figure it now (implemented it myself several
times in past).
> There was a compiler warning about an "unused variable i", but
> everything else looks fine. Thanks for your contribution!
My matrices tend to be much denser (tens to hundreds nonzeros per row),
but the python FE code is not working right now (new gcc + swig issues
after an upgrade) so let's call it a success for now... :)
More information about the Scipy-dev