compiling Maxima 5.29.1 on Allegro Common Lisp, 16X speedup



Thx for this recipe.
Compiling Maxima is the time when one can allocate more memory.
Can you describe it ?

Regards

Adam

On 13.01.2013 02:32, Richard Fateman wrote:
> The recipe I gave previously didn't seem to quit work, but I plowed on
> and got it going.
>
> 1. download the source for Maxima.
>
> 2. start up allegro common lisp ALISP  (ansi)
> :cd to the directory maxima-5.29.1/src
>
> 3. type (asdf::load-system :maxima)
>
> 4. when it finishes compiling and loading everything,
> type
>
> (in-package :maxima)
> (continue)
>
>
> Now not everything is set up.  in particular, plotting, info. Also the
> front end is just ascii,
> not wxmaxima.
>
> And also I changed the maxima-5.29.1/src/maxima.asd file to exclude
> numerical module
>
> .. line 114
>    #+ignore
>       (:module numerical
>
> ... because of compiler messages about f2cl-lib:integer4 unrecognized,
> and stalling in
> compiling j4save.lisp.
>
> I did not dump out a ".dxl" binary file of maxima, but if I did so it
> would make
> the startup faster, instead of loading the files into a lisp. That takes
> maybe 20 seconds.
>
>
> There were a bunch of apparently harmless compiler warnings along the
> way about variables
> that were not accessed or assumed "special" because they were not bound
> before use.
>
> The nice thing about this recipe is that it uses just lisp.  No perl,
> make, config, gcc, m4, awk.
> No makefiles,  (except for maxima.asd).
>
> why did I do this?  I wanted to try out some functionality that runs in
> Allegro but not
> in GCL, but may run in SBCL or other "maintained" lisps.  It requires
> hash tables to allow
> for something like this....
>
> (setq *uniq-table*
>    (make-hash-table :size 10000 :test #'equal :weak-keys :tenurable
> :values nil))
>
>
> what this buys me is simplification speedups like this:
>
> m(i):=remainder(i,13)*z^remainder(i,991)$
> sum(m(i),i,1,20000)$
>
> though actually that last line should be
>
> ?dosum('m(i),i,1,20000, t)  $    to just do the summation most simply.
>
> The standard Maxima on my system, compiled in Allegro takes 32 secs.
> After changes, 2.06 seconds.
> this is done by changing the simplifier.
> Barton Willis and I fiddled with this in 2006 but as I recall we didn't
> push it through for
> 2 reasons.
> 1. on some lisps and on small expressions, it was not faster.
> 2. there are some parts of the simplifier that we didn't get around to
> altering
> that would have to be changed to be compatible.
> Others, especially hot-shot lispers, are welcome to look at the code
> (just ask..) and tune it etc.
>
> RJF