[SciPy-Dev] solve_banded is very slow as a tridiagonal solver

Marcel Oliver m.oliver at jacobs-university.de
Fri Aug 14 22:56:18 EDT 2015


Eric Moore writes:
 > First I would try updating to version 0.16.  Solve_banded was
 > updated to use dgtsv when given a tridiagonal system.  Dgtsv does
 > do partial pivoting, but it should be much faster than dgbsv for
 > this case.  For a system of 1e6, it is about 6 times faster for me
 > ( 39.1 ms vs 270 ms).
 > 
 > Eric

Dear Eric,

thank you very much for the quick reply.  I'll follow this issue and,
if necessary, report back.  For now, we'll probably just go with my
cython hack as it's unreasonable to expect my collaborators to
hand-update scipy.  But the tridiagonal issue comes up often enough
that it's worth some thought and optimization.  Even if it's only a
factor two in the end (I'll check once I get to update), a plain
Thomas tridiagonal solver would probably be worth it.

With best regards,
Marcel




More information about the SciPy-Dev mailing list