bug in solve



Vadim V. Zhytnikov wrote:

>
> Comparing Maxima under GCL and CLISP I noticed another
> strange thing. If execute sequentially
> showtime:true;
>    w:expand((x+y+z)^100)$
>    ww:expand((x+y+z)^200)$
>    www:expand((x+y+z)^300)$
> I get timings
>   3 sec
>   15 sec
>   40 sec
> But if I restart Maxima and do just
>   www:expand((x+y+z)^300)$
> I get  100 sec ! Why timings are so diffrent?
> This is GCS feature since under CLISP time is always the same.

here is a possible explanation.
doing the sequence of commands, the system realizes that it
must allocate more memory, and does so several times and
does not waste too much in garbage collection.

when you restart maxima, the garbage collection new-allocation
algorithm does not realize that it is going to need a lot more
space until it has already used up many seconds.

Tuning the garbage collection algorithm can make big differences.
One reason the commercial version of macsyma is so slow
is precisely that.   for expand ((x+y+z)^200)$ the time
taken on my system is 128.5 seconds, 92 seconds in GC.
That is, the "useful" computation took 36 seconds.
RJF