Subject: Maxima: compiling with cmucl, sbcl and gcl.
From: C. Frangos
Date: Sun, 8 Jul 2007 20:48:14 +0200
Hi Robert,
Unfortunately, it is not possible to send the program as this calls a
number of functions which I have written, which in turn call other functions,
etc.
However, what I wanted to tell you is that in the second half of the program
the function mysimprec() (see below) is called about 5 times.
>From the running times given below, it appears that Maxima 5.10 is much
faster than Maxima 5.12 in running this function.
(1) First half of program (second half commented out):
amd64: suse linux 10.1, 64 bit, Maxima 5.10, cmucl: 5.8 sec
amd64: suse linux 10.1, 64 bit, Maxima 5.12, cmucl: 6.8 sec
(2) First half of program plus one call to mysimprec():
amd64: suse linux 10.1, 64 bit, Maxima 5.10, cmucl: 6.6 sec
amd64: suse linux 10.1, 64 bit, Maxima 5.12, cmucl: 86.7 sec
(3) Whole program:
amd64: suse linux 10.1, 64 bit, Maxima 5.10, cmucl: 14.7 sec
amd64: suse linux 10.1, 64 bit, Maxima 5.12, cmucl: 170.5 sec
Best regards,
C. Frangos.
On Friday 06 July 2007 06:44, you wrote:
> On 7/5/07, C. Frangos <cfrangos at telkomsa.net> wrote:
> > amd64: suse linux 10.1, 64 bit, Maxima 5.10, cmucl: 14.7 sec
> > amd64: suse linux 10.1, 64 bit, Maxima 5.10, sbcl: 17.7 sec
> > amd64: suse linux 10.1, 64 bit, Maxima 5.10, clisp: 64.3 sec
> >
> > amd64: suse linux 10.1, 64 bit, Maxima 5.12, cmucl: 170.5 sec
> > amd64: suse linux 10.1, 64 bit, Maxima 5.12, sbcl: 200.5 sec
> > amd64: suse linux 10.1, 64 bit, Maxima 5.12, clisp: 633.4 sec
>
> This is very intriguing. I would certainly like to know why
> 5.12 is apparently much slower. I don't believe we have had
> other reports of that, so I'm guessing the reason depends on
> the details of the program you are running. In the absence of
> the program, I don't think we can tell. So I'll take this opportunity
> to encourage you to post the program if you can.
>
> best
> Robert Dodier
mysimprec(s) := block(
[indexlist,sx,nf,listsimpf,nsx,nmin,simpf,sxnew],
listsimpf : [fullratsimp, trigsimp, factor, trigreduce, dividethru],
nf : length(listsimpf),
sx : s,
nmin : length(string(sx)),
indexlist : [],
for i1 : 1 thru nf do (
simpf : listsimpf[i1],
sxnew : apply(simpf,[sx]),
nsx : length(string(sxnew)),
if (nsx < nmin) then (
indexlist : endcons(simpf,indexlist),
sx : sxnew,
nmin : nsx
)
),
display(indexlist),
return(sx)
);
dividethru(a) := block(
[num, den, quo, result],
if not atom(a) and op(a)="//" then
(
num : part(a,1),
den : part(a,2),
quo : divide(num,den),
result : quo[1]+quo[2]/den
)
else
(result : a),
return(result)
);