strange decay of performance of Maxima



Oliver Kullmann wrote:
> Hello,
>
> I'm experiencing strange bad performance, which perhaps
> relates to bad memory management (using Maxima 5.17.1 and
> Ecl 8.12.0):
>
> I have a function f(n) (say; I don't think that the precise
> details matter here), which computes a list of length
> proportional to n.
> The main function is F(n), which just computes the concatenation
> of f(1), ..., f(n) (there are some complications, but I don't think
> they matter).
>   
I'm not aware of anything obvious, but unless someone already knows why,
I think it will be hard to figure out what's happening.

Knowing the function f(n) and/or f[n] might provide some hints. Knowing
what version was fast would also help narrow done the search.

Ray

> In order to speed-up the computation, f(n) is actually f[n],
> so it memoises (the point here is that F(n) needs to be investigated,
> and then typically a new computation F(n') is launched, where n' is
> somewhat smaller or somewhat bigger).
>
> Now here are the running times:
>
> (%i127) F(33600);
> Evaluation took 116846.9500 seconds (185530.3700 elapsed)
> (%o127) done
> (%i128) F(33800);
> Evaluation took 22433.8660 seconds (22988.8430 elapsed)
> (%o128) done
> (%i129) F(34000);
> Evaluation took 34525.6380 seconds (34642.6760 elapsed)
> (%o129) done
> (%i130) F(35000);
> Evaluation took 52942.4810 seconds (53078.5270 elapsed)
> (%o130) done
> (%i131) F(34500);
> Evaluation took 58397.8730 seconds (59343.3410 elapsed)
> (%o131) done
> (%i132) F(34250);
> Evaluation took 73483.6930 seconds (73506.2950 elapsed)
> (%o132) done
>
> Already the computation at 129 looks a bit lame, but so well, until
> line 130 it seems basically alright. But the computation at 131 should
> have taken definitely much less than the computation at 130, and the
> computation at line 132 should have taken not more than the computation
> at 131. So something's going wrong here.
>
> Memory usage is about 1GB.
>
> Any idea?
>
> Oliver
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>