Efficiency Improvements in Maple 11NumericsPolynomial Algebra and Polynomial System SolvingLinear AlgebraPolynomial Greatest Common DivisorProgrammingMulti-Threaded ProgrammingDynamic Garbage Collection

<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk0">Numerics</Text-field>Maple can now use hardware floating-point values even outside the restricted evalhf environment. By marking procedures with the new optionhfloat, Maple uses hardware floating-point arithmetic wherever possible. For numeric intensive procedures, this can increase performance by factors of 2 to 10 or more.Hardware floating-point values can also be used directly via the HFloat constructor. The presence of a hardware floating-point number in an expression generally implies that the computation will use hardware floating-point evaluation, unless the settings of Digits and UseHardwareFloats specify otherwise (see UseHardwareFloats).Maple's default stiff numerical ODE solver has been made more efficient with respect to large problems, as well as the default stiff/nonstiff numerical DAE solvers.Maple's fsolve command has become more efficient for real solutions of univariate polynomials. The first of the following two calling sequences uses the Maple 10 algorithm, while the second one employs the new RootFinding[Isolate] command (the output is identical in both cases since the Chebyshev polynomials have real roots only):f := expand(ChebyshevT(100, x)):time(fsolve(f, x, complex));time(fsolve(f, x));
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk1">Polynomial Algebra and Polynomial System Solving</Text-field>The engine underlying the Groebner[Basis] command has become dramatically more efficient by incorporating Jean-Charles Faugere's C implementation of his F4 algorithm. It is used by default for systems with rational number coefficients and graded orders.Many other commands in the Groebner package have become significantly faster as well.The Multiply command for modp1 polynomials now uses Karatsuba's algorithm for polynomials of sufficiently high degree.The evala command uses more efficient data representations and algorithms for computations involving polynomials with algebraic number coefficients. As a result, gcd computations for such polynomials have become significantly faster in many cases.Examples To execute the following examples, open this help page as a worksheet. In the help system, click the Open the current help page in a worksheet window icon in the toolbar.F4 algorithm for Groebner basis computations:with(Groebner):cyclic6 := [u+v+w+x+y+z,
u*v+v*w+w*x+x*y+y*z+z*u,
u*v*w+v*w*x+w*x*y+x*y*z+y*z*u+z*u*v,
u*v*w*x+v*w*x*y+w*x*y*z+x*y*z*u+y*z*u*v+z*u*v*w,
u*v*w*x*y+v*w*x*y*z+w*x*y*z*u+x*y*z*u*v+z*y*w*v*u+z*u*v*w*x,
u*v*w*x*y*z-1]:cyclic7 := [t+u+v+w+x+y+z,
t*u+u*v+v*w+w*x+x*y+y*z+z*t,
t*u*v+u*v*w+v*w*x+w*x*y+x*y*z+y*z*t+z*t*u,
t*u*v*w+u*v*w*x+v*w*x*y+w*x*y*z+x*y*z*t+y*z*t*u+z*t*u*v,
t*u*v*w*x+u*v*w*x*y+v*w*x*y*z+w*x*y*z*t+x*y*z*t*u+y*z*t*u*v+t*u*v*w*z,
t*u*v*w*x*y+u*v*w*x*y*z+v*w*x*y*z*t+w*x*y*z*t*u+x*y*z*t*u*v+y*z*t*u*v*w+z*t*u*v*w*x,
t*u*v*w*x*y*z-1]:time(Basis(cyclic6,'tdeg'(u,v,w,x,y,z)));time(Basis(cyclic7,'tdeg'(t,u,v,w,x,y,z)));For comparison, we time Buchberger's algorithm on the cyclic6 example. (The reason for calling RememberBasis with second argument forget is to disable the caching mechanism and force subsequent recomputation of the Groebner basis using a different method.)RememberBasis(cyclic6,'forget','tdeg'(u,v,w,x,y,z)):time(Basis(cyclic6,'tdeg'(u,v,w,x,y,z),'method'='buchberger'));The following gcd computation of two polynomials with algebraic number coefficients is about 10 times faster than in Maple 10:a := (x+2^(1/2)+3^(1/2))^20:b := (2^(1/2)*x+3^(1/2))^20:c := (x^2+x+1+2^(1/3)*3^(1/3))^10:f := expand(a*b):g := expand(a*c):time(gcd(f,g));
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk2">Linear Algebra</Text-field>The Matrix and Vector construction and concatenation shortcut notations, LUklbXJvd0c2JEkqcHJvdGVjdGVkR0YlL0krbW9kdWxlbmFtZUc2IkksVHlwZXNldHRpbmdHNiRGJUkoX3N5c2xpYkdGKDYlLUkjbW9HNiRGJS9GJ0YpNiNRJSZsdDtGKC1GLjYjUSgmY29tbWE7RigtRi42I1ElJmd0O0Yo and LUklbXJvd0c2JEkqcHJvdGVjdGVkR0YlL0krbW9kdWxlbmFtZUc2IkksVHlwZXNldHRpbmdHNiRGJUkoX3N5c2xpYkdGKDYlLUkjbW9HNiRGJS9GJ0YpNiNRJSZsdDtGKC1GLjYjUSJ8Z3JGKC1GLjYjUSUmZ3Q7Rig=, have been made much more efficient. These are now the easiest and most efficient ways (in terms of both time and space) to construct fully specified dense rectangular Matrices and Vectors, and to perform most Matrix and Vector concatenations.The LinearAlgebra[Modular] package has two new commands, IntegerCharacteristicPolynomial and IntegerDeterminant, for fast computation of characteristic polynomials and determinants of integer matrices using modular algorithms. Maple computes the characteristic polynomial (determinant) modulo a sequence of machine primes. For each prime, Maple uses an NiMtSSJPRzYkSSpwcm90ZWN0ZWRHRiZJKF9zeXNsaWJHNiI2IyokSSJuR0YoIiIk algorithm in both cases. These commands are integrated directly into the LinearAlgebra[CharacteristicPolynomial] and LinearAlgebra[Determinant] commands for handling the integer cases.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk3">Polynomial Greatest Common Divisor</Text-field>The gcd command is now using a new algorithm for multivariate polynomial gcd computations over the integers. The efficiency improvements obtained by this algorithm are most noticeable for problems in three or more variables.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk4">Programming</Text-field>Changes in the Maple argument processing mechanism and how storage is allocated for procedure arguments have improved performance and reduced memory requirements for virtually all Maple procedure calls. These gains benefit both custom and library procedures.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk5">Multi-Threaded Programming</Text-field>Maple 11 introduces the ability to write and execute multi-threaded code. This allows Maple to execute code on multiple CPUs in parallel. This can lead to significant performance improvements. For an overview of multi-threading in Maple, see the multi-threaded Maple help page. The Threads package provides the user interface to writing multi-threaded code.
<Text-field style="Heading 2" layout="Heading 2" bookmark="bkmrk6">Dynamic Garbage Collection</Text-field>The frequency of memory garbage collection has always been an interval based on a fixed amount of memory used. Now, the gcfreq setting of kernelopts accepts a second parameter allows the collection frequency to dynamically adjust as more memory is allocated.