
zip



Several enhancements were made to zip.

•

Direct hardwarefloat callbacks are recognized for certain routines. These can bypass much of the overhead of ordinary interpreted function evaluation resulting in speed similar to that of compiled code. The following now takes 0.084 seconds in Maple 12 compared to 3.900 seconds on the same machine in Maple 11.

>

A := Matrix(1..N,1..N,datatype=float[8]):

>

B := Matrix(1..N,1..N,datatype=float[8]):

•

Special case detection for some builtin nonhardware float operations. For example, the following now takes 0.104s compared to 3.532s before.

>

A := Matrix(1..N,1..N):

>

B := Matrix(1..N,1..N):

•

Automatic procedure inlining is applied when possible. Most arrowoperator functions bypass normal function evaluation overhead resulting in better speed. The following now takes 1.104s compared to 4.248s before.

>

A := Matrix(1..N,1..N):

>

B := Matrix(1..N,1..N):

>

time(zip((x,y)>x+y+1,A,B));



Block Copy


•

With the introduction of round bracket array indexing, certain blockcopy operations can be done much more efficiently as no intermediate object needs to be created. For example the second timing below using round brackets for indexing into A and B is much faster than the first timing, which uses square brackets. The result of a square bracket index assignment is always the assigned value so an intermediate object needs to be computed. The result of a round bracket index assignment is always the whole array, so, if the right side is a large block subselection, the intermediate copy can be bypassed in most cases resulting in memory savings.

>

A := LinearAlgebra:RandomMatrix(N,N):

>

B[1001..4000,1001..4000]:=A[1..3000,1..3000]:

>

B(1001..4000,1001..4000):=A(1..3000,1..3000):



Improvements to solve


•

The solve command takes further advantage of the FGb library, the world's most efficient Groebner bases engine. It also uses a new, faster sparse exact linear system solver for systems with rational coefficients.

•

Here is an example of a small dimension 1 system for which the solve command in Maple 11 was unable to find a solution. A solution could be found using FGb by calling the Groebner[Solve] command. Now in Maple 12, solve uses FGb and finds the 22 solutions in about 30 seconds.

>

symmetric5:={d^5e^5,c^5d^5,b^5c^5,a^5b^5,a^4*b+b^4*c+c^4*d+d^4*e+a*e^4}:

>

time(solve(symmetric5,{a,b,c,d,e}));


In Maple 10, before the FGb library was used by the Groebner package, solving this system would have taken about twice as long on the same machine.



Expansion of Symbolic Polynomials


•

Expansion of large polynomials via the expand command has been improved. The following is a subset of a larger example. The original example used to take over 1400s to compute and now finishes in under 200s on the same machine. The example below has about a 3 times speedup compared to Maple 11.

>

ee :=
(12*c^2*x^2*f+18*c^2*x^2*b+18*c*x^2*g*f+18*x^2*b*a^2+18*c^2*x^2*a12*x^2*b^2*f12*c^2*x^2*g+18*x^2*b^2*a+18*c*x^2*b^24+6*g12*x*a*g6*x^3*b*a^227*x^2*g*f12*x*a*f+63*x*g*f12*c*x*f+12*x*a*g^26*c*x^2*a*f6*c*x^2*b*f6*c*x^2*b*g+6*c*x*g*f6*c*x^2*a*g6*x^2*b*a*f+6*x*b*g*f6*x^2*b*a*g+6*x*a*g*f18*x*b*a*f18*x*b*a*g18*c*x*a*f18*c*x*a*g18*c*x*b*f+54*c*b*a*x18*c*x*b*g+4*x^3*b^3+4*x^3*a^3+4*c^3*x^3+6*c^2*x^2+6*x^2*b^2+18*x^2*f54*c*b*a*x^2+9*x+6*f+9*x*b*a+24*c*b*a*x^3+18*x^2*b*g*f+18*x^2*a*g*f+18*c*x^2*a^212*x^2*b^2*g12*x^2*a^2*f12*x^2*a^2*g)^6:



