Slowness of limit



On Thu, Jul 23, 2009 at 10:29 AM, Stefano Ferri<ferriste at gmail.com> wrote:

> (%i16) map(lambda([el],limit(el,bk,inf)),K)$

It turns out this maps over rows, not elements.
I think you want "matrixmap" instead.

> ? ? ? ? ? ? ?[0,0,4*E*I/l,0,0,0,3*sqrt(3)*E*I/l^2,-3*E*I/l^2,2*E*I/l,0,0,0,0,

If E means Euler's number and I means the imaginary unit,
then you want %e and %i instead.

About getting it to run faster, maybe

matrixmap(lambda([e],if e=0 then 0 else limit(e,bk,inf)), K) $

is enough. I find it's several times faster than limit(K, bk, inf)
since it doesn't call limit(0, bk, inf).

Bear in mind that getting a different (faster) Lisp implementation
and recompiling Maxima is likely to be time-consuming.
Will you ever recover the time invested? I think you could
easily spend a couple of days on it.

FWIW

Robert Dodier