Here's what I tried, in xmaxima 5.13 on gcl.
I took simp.lisp for 5.13 and compiled it fresh. call this file "orig.o"
I modified simp.lisp for 5.13 and defined memq as a macro, and compiled it.
call this file "new.o"
let h be (1+x+y+z+t)^25.
load ("orig.o"); expand(h)$ takes 6.1 seconds.
load ("new.o"); expand(h)$ takes 4.9 seconds.
This is repeatable. 6.10 seconds, 4.63 seconds.
So we get about a 20% speedup, on windows xp, pentium 4, GCL, Maxima 5.13.
Now what I do not understand is that before loading "orig.o", expand(h)$
takes about 2.3 seconds. So there is something about MY compiling of orig.o
that produces slower code. Perhaps there is a prologue to compiling that I
am
not using. Nor can I explain why the code -- which replaces memq with what
I think
is fully equivalent to memq, fails to run tests rtest2.
compiling with the added line in the file
(declaim (optimize (speed 3)(safety 0)))
seems to make no difference in times.
RJF