[Ecls-list] more about Maxima + ECL
Juan Jose Garcia-Ripoll
jjgarcia at users.sourceforge.net
Mon Apr 28 13:10:10 UTC 2008
On Mon, Apr 28, 2008 at 4:07 AM, Robert Dodier <robert.dodier at gmail.com> wrote:
> Hello,
Hi Robert, excuse me for removing the references to the other mailing
lists, but I am not subscribed to them and have no permission to post
there.
> (1) Maxima + ECL, interpreted, works OK although there are about 12
> unexpected test suite errors. Of the errors, I see 3 kinds.
> (1a) different results in floating point computations
Are you using floating point computations which involve special
functions (sin, cos, tanh, etc)? These are based on the C library and
I have observed that the accuracy varies from platform to platform
> (1b) simplification problems -- i.e. equivalent but different expressions
> (1c) a type-coercion problem -- failed to coerce an integer to a complex
> number or something like that.
This seems to work:
> (coerce 1 'complex)
1
> (complex 1)
1
> (2) Maxima + ECL, compiled, is a mess. The assume stuff
> (testing the sign of expressions) doesn't work and that messes up
> a lot of other stuff (integrals, limits). I am pretty sure that the
> root problem is that EVAL-WHEN is not handled correctly, or,
> at least, not handled in the same manner as other Lisp implementations.
I would assume the latter. It may be that your eval-whem are assuming
something about the behavior of the compiler, but I am more than
willing to have a look at it. I checked out the CVS version of Maxima
with your patches. Where do I start to test this setup?
> (3) Maxima + ECL, interpreted, runs its testsuite in about 10 times
> as long as for Clisp or GCL. (GCL is definitely faster than Clisp,
> but both are much faster than interpreted ECL.)
> Maxima + ECL, compiled, is faster, maybe as fast as Clisp,
> but I can't tell for sure since there were so many errors.
Again, how do I test setups 1 2 and 3?
> (4) ECL's COMPILE function is very slow. That's too bad since
> Maxima would like to compile stuff like integrands and functions
> to be plotted.
You can compile to bytecodes if you do not want to run through the C compiler.
(defun my-compile (x) (eval x))
where "x" is a lambda form.
> Well, there you have it. Maxima is a rather ancient and
> idiosyncratic program, so it is a hard test of Lisp compilers,
> I believe.
My experience is also that Maxima assumes a certain behavior of the
lisp image such as the fact that COMPILE is cheap, that lots of files
can be loaded and, in the past, that memory images could be dumped.
ECL works better with programs that can be compiled from separate
files and linked together into a single FASL file. So it may be also a
problem of different approaches to how things work or are expected to
work.
But as I said, I do not mind having a look at Maxima and what are the
performance bottlenecks.
Juanjo
--
Facultad de Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 28040 (Spain)
http://juanjose.garciaripoll.googlepages.com
More information about the ecl-devel
mailing list