Efficiency - Maple Help

Efficiency Improvements in Maple 9.5

 A number of efficiency improvements have been applied to Maple. Maple 9.5 is faster and uses less memory.

Quotients of Polynomials

 Maple 9.5 is more efficient when computing the quotient of sparse polynomials.

Example

 > p1 := 25000000000000000000*x^24*(234374765625000000*(x^(1/5000000000*a))^609256031*y^9256031 + 7946285261481299*x^12*y^27768093 - 56259267500000000*(x^(1/10000000000*a))^609256031*x^6*z^9256031)^4;
 ${\mathrm{p1}}{≔}{25000000000000000000}{}{{x}}^{{24}}{}{\left({234374765625000000}{}{\left({{x}}^{\frac{{a}}{{5000000000}}}\right)}^{{609256031}}{}{{y}}^{{9256031}}{+}{7946285261481299}{}{{x}}^{{12}}{}{{y}}^{{27768093}}{-}{56259267500000000}{}{\left({{x}}^{\frac{{a}}{{10000000000}}}\right)}^{{609256031}}{}{{x}}^{{6}}{}{{z}}^{{9256031}}\right)}^{{4}}$ (1)
 > p2 := y^100000000-x;
 ${\mathrm{p2}}{≔}{{y}}^{{100000000}}{-}{x}$ (2)
 > t0 := time():
 > res := quo(p1, p2, y);
 ${\mathrm{res}}{≔}{99677380232696642539570742968540066928124035645820992834105370025000000000000000000}{}{{x}}^{{72}}{}{{y}}^{{11072372}}$ (3)
 > time_consumed = time()-t0;
 ${\mathrm{time_consumed}}{=}{0.009}$ (4)

Indefinite Rational Summation

 The algorithm of Gerhard, Giesbrecht, Storjohann, and Zima for indefinite rational summation has been incorporated into SumTools[Hypergeometric][SumDecomposition]. It is faster than the previous algorithm when the dispersion of the input is large.

Example

 > ee := (x^2+2000*x+1001000)/((x+1001)*(x+1000)*x);
 ${\mathrm{ee}}{≔}\frac{{{x}}^{{2}}{+}{2000}{}{x}{+}{1001000}}{\left({x}{+}{1001}\right){}\left({x}{+}{1000}\right){}{x}}$ (5)
 > t0 := time():
 > Sum(ee,x) = sum(ee,x);
 ${\sum }_{{x}}{}\frac{{{x}}^{{2}}{+}{2000}{}{x}{+}{1001000}}{\left({x}{+}{1001}\right){}\left({x}{+}{1000}\right){}{x}}{=}\frac{{1}}{{x}{+}{1000}}{+}{\mathrm{\Psi }}{}\left({x}\right)$ (6)
 > time_consumed = time() - t0;
 ${\mathrm{time_consumed}}{=}{0.140}$ (7)

Operations on Matrix Sub-blocks

 • The new rtable_scanblock command performs efficient block-operations on regions of a Matrix, Vector, or Array.

Rtable Type Checks

 Type checks of the form type(M,'Matrix'(algebraic)), which usually need to scan the entries of the given Matrix, Vector, or Array are much faster in Maple 9.5.

Example

 > M := LinearAlgebra:-RandomMatrix(500);
  (8)
 > time_consumed = time( type(M, 'Matrix'(algebraic)) );
 ${\mathrm{time_consumed}}{=}{0.009}$ (9)

Conversions Between diff and D

 Maple 9.5 includes faster conversions between the diff and D notations for derivatives.

Example

 > diff( f(x,y,z,t), x$74, y$143, z\$236 );
 $\frac{{{\partial }}^{{453}}}{{\partial }{{x}}^{{74}}{\partial }{{y}}^{{143}}{\partial }{{z}}^{{236}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{f}{}\left({x}{,}{y}{,}{z}{,}{t}\right)$ (10)
 > time_consumed = time( convert( (10), D ) );  # before it was 1/2 minute in typical machines
 ${\mathrm{time_consumed}}{=}{0.027}$ (11)

Numerical Linear Algebra

Windows

 Maple 9.5 for Windows uses version 6.1 of the Intel Math Kernel Library (MKL) resulting in faster computation for large-sized hardware floating-point linear algebra operations.
 The following example takes approximately 6.7 seconds in Maple 9 and 4.0 seconds in Maple 9.5 on a 1.7GHz P4 machine running Windows 2000.
 > M := LinearAlgebra:-RandomMatrix( 1600, outputoptions = [datatype = float[8]] ):
 > time( M.M ); # see text above for timings

Linux and Macintosh OS X

 Maple 9.5 for Linux and Macintosh OS X uses tuned versions, from ATLAS, of a select group of CLAPACK functions related to hardware floating-point linear algebra computations, such as LUDecomposition and LinearSolve.
 The following example takes approximately 0.66 seconds in Maple 9 and 0.40 seconds in Maple 9.5  on a 2.4GHz P4 machine running Linux. On a G5 machine running OS X 10.3, this example takes approximately 0.43 seconds in Maple 9 and 0.25 seconds in Maple 9.5.
 > M := LinearAlgebra:-RandomMatrix( 1000, outputoptions = [datatype = float[8]] ):
 > V := LinearAlgebra:-RandomVector( 1000, outputoptions = [datatype = float[8]] ):
 > time( LinearAlgebra:-LinearSolve( M, V ) ); # see text above for timings