Michel Talon wrote:
> Oliver Kullmann wrote:
>
> Here is an extreme example, i think there must be an error somewhere but
> anyways, on this example (extracted from batch("grobner.demo") ) i see
> a huge speed advantage for sbcl (some years ago, cmucl was faster than
> sbcl on this example). The example is interesting since it is a pure big
> symbolic computation. I would expect clisp to take ages on this one.
> I have checked i don't have precompiled grobner.fasl
> or the like. Of course both are on the same machine:
>
<snip, sbcl runs 50 times faster than cmucl on a problem >
As was to be speculated the explanation is that sbcl compiles grobner.lisp
without being instructed to do it, so one needs to compare with cmucl with
compiled grobner. Then sbcl is always faster but the difference is more
reasonable. On the same apple machine, maxima-5.25.1 with latest cmucl and
sbcl:
cmucl:
(%i8) compile_file("grobner.lisp");
(%o8) [grobner.lisp, /Users/michel/grobner.sse2f]
(%i9) :lisp(load "grobner.sse2f")
Loading maxima-grobner $Revision: 1.6 $ $Date: 2009-06-02 07:49:49 $
T
(%i9) ev(poly_grobner([- 1 + z^3 + y^4 + x^5 , - 1 + z^2 + y^3 + x^3 ],[x,
y, z]), poly_coefficient_ring = 'ring_of_integers);Evaluation took 1.1300
seconds (1.1400 elapsed) using 131.275 MB.
?.
sbcl:
(%i2) showtime:all;
Evaluation took 0.0000 seconds (0.0000 elapsed) using 0 bytes.
(%o2) all
(%i3) ev(poly_grobner([- 1 + z^3 + y^4 + x^5 , - 1 + z^2 + y^3 + x^3 ],[x,
y, z]), poly_coefficient_ring = 'ring_of_integers);
Evaluation took 0.5360 seconds (0.5740 elapsed) using 89.044 MB.
Note that, on this symbolic computation program, which produces huge output,
sbcl is twice as fast as cmucl. So the timing differences may be much larger
than what is asserted in this thread.
The second -obvious- comment is that compiling makes a huge time difference
(on this machine the uncompiled grobner runs for 28s), but also a huge memory
difference (1337.651 MB against 131.275 MB). This may give an idea of the
performance of clisp on such programs, since it is probably even worse than
uncompiled cmucl.
Oliver asserted that sbcl is slower to load a bunch of his files. Maybe this
is because it compiles stuff on the fly, at it does here for grobner.lisp
P.S. There is a bug in the documentation for Grobner. It begins by:
A tutorial on Groebner Bases can be found at
http://www.geocities.com/CapeCanaveral/Hall/3131/
But, of course the link is no more working. I have found another copy here:
http://www.starbacks.ca/CapeCanaveral/Hall/3131/ and http://www.iisdavinci.it/
thanks to Google!
I have done a copy in order to avoid further loss:
http://www.lpthe.jussieu.fr/~talon/g_bases.htmlhttp://www.lpthe.jussieu.fr/~talon/orderings.htmlhttp://www.lpthe.jussieu.fr/~talon/buchberger.htmlhttp://www.lpthe.jussieu.fr/~talon/Ideals.htmlhttp://www.lpthe.jussieu.fr/~talon/GB_Properties.htmlhttp://www.lpthe.jussieu.fr/~talon/Division.html
which seem to form a complete set, and to be rather easy reading.
There is also an applet on iisdavinci
http://www.iisdavinci.it/jeometry/groebner_applet.html
--
Michel Talon