We had buy a v7 version of Maple. All my calculation that was working good on v5 take up to 60 times more on v7. My PC is an PIII/866, on Windows 98 SE. Ex. Takes 3 second on v5 takes 180 seconds on v7. Here is an exemple of the calculation:
restart;with(plots):with(plottools): `De forme avec des cylindres`; volume:=cuboid([0,0,0],[4,4,4],color=green): f1:=cylinder([2,2,3.9],0.5,0.15,color=pink): f3:=seq(rotate(cylinder([3.9,i,i],0.4,0.15,color=pink),Pi/2,[[3.9,0,i], [3.9,4,i]]),i=1..3): f6:=seq(seq(cylinder([i,j,-0.05],0.4,0.15,color=pink),i=1..3),j=[1,3]): display(volume,f1,f3,f6,scaling=constrained,axes=none,orientation=[-40,70]); c1:=cylinder([0,0,0],1,1,color=red): rotate(c1,Pi/2,[[1,1,1],[2,2,2]]);
Because I am thinking about upgrading from Maple 6 to Maple 7, I did the test with Martyn’s code.
My system is a PC with WIN 98 SE, 366MHz, 128MB.
Maple V Release 5.1: 85 seconds
Maple 6.02: 193 seconds
The perfomance difference is not as dramatic as the one reported by Martyn, but certainly significant.
I made sure to quit Maple V version before I started Maple 6 and vise versa. I also repeated the test after rebooting, etc.
Now, I am wondering whether Martyn’s result with Maple 7 tell me that I should stay away from Maple 7.
Examination of the code of plottools[rotate]
shows an obvious inefficiency: the
transformation involves a function that is hellishly complicated, but should be very
simple. One possible patch is to make a1, a2, a3
local variables and change line
41:
f := proc (a1, a2, a3) ...etc... end proc
to
f:= unapply(...etc..., a1,a2,a3)
Frank Gerdes wrote:
| I made sure to quit Maple V version before I started Maple 6 ...
This should be unnecessary for such comparisons (except in cases with extreme memory consumption).
| Now, I am wondering whether Martyn's result with Maple 7 tell me ...
Wrapping the last rotate statement in display() (probably intended so), I obtain these timings (P-III 700MHz, NT4 SP6, Matrox G200 AGP):
Maple 7 : 53.326s Maple 6.02a: 51.363s Release 5.1: 32.305s
In Release 5.1, the graphics are not as accurate as in newer versions: the dice marks are not completely filled, and the grid lines are less regularly distributed on the cylinder. Maybe a matter of taste...
Meanwhile I got Maple 7 and found that it is as slow as Maple 6 when executing Martyn’s code. I mean slow compared to Maple V R5.1 (see previous postings below).
I had a look at the code of plottools[rotate]
and I agree that is is very complicated and
that it might be inefficient. But I am fairly sure that Maple V R5.1, Maple 6 and Maple
7 use the same code. I did a visual inspection and could not find any signficant
differences.
So, that leaves me still puzzled why Maple 6 and Maple 7 are so much slower when executing
plottools/rotate'-code
than Maple V R5.1.
P.S.: I suppose most of the time one doesn’t notice these things, because PCs seem to get faster at a slightly larger rate than software gets slower.
I got the following timings: (U. Klein)
MapleV.5.1: 42.899s Maple6.01: 77.361s Maple7: 85.040s Maple8: 4.210s