On 24 avg., 08:52, William Stein <wst...@gmail.com> wrote:
> OK, that is very valuable to know.   It means that independent of
> Sage, just evaluating the same expression "1+2" in Maxima repeatedly
> quickly leads to dramatic slowdowns.  This seems to me like an
> absolutely huge bug in Maxima.
>
> I did another test.  I created a file with the lines
>
> elapsed_run_time();
> elapsed_run_time();
> elapsed_run_time();
> elapsed_run_time();
> elapsed_run_time();
> elapsed_run_time();
>
> repeated many times.
>
> sage: s = 'elapsed_run_time();\n'*100000
> sage: open('in','w').write(s)
>
> Then I did
>
> ./sage -maxima < in > out
>
> Finally I looked at out.  At the beginning we have:
>
> (%i1)
> (%o1)                                0.06
> (%i2)
> (%o2)                                0.06
> (%i3)
> ...
> (%i31)
> (%o31)                               0.07
>
> I.e., it takes 30 input lines until the time counter goes from 0.06 to 0.07.
> Later in the file we have:
>
> (%o35147)                           107.03
> (%i35148)
> (%o35148)                           107.04
> (%i35149)
> (%o35149)                           107.05
> (%i35150)
> (%o35150)                           107.06
>
> I.e., now Maxima is 30 times slower than it was before.
>
> I wonder -- if Maxima's basic arithmetic -- e.g., simplifying 1+2 --
> is super slow for some abstract reason, I wonder if it is taking
> longer and longer to compute the next prompt number.  That would be
> pretty funny.  Is there any way to turn off the prompt numbers?
>
> Help! What is going on!?

The slowdown is probably caused by makelabel in suprv1.lisp. It check
that the list containing all labels does not contain the new label
which it generates. After you create 2*35150 labels, this takes longer
than when maxima starts.

If this is true the slowdown should be decreased if you add
nolabels:true; at the top of in.

Andrej

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to