Performance - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : What's New and Release Notes : updates/Maple2020/Performance

Performance

Maple 2020 improves the performance of several key functions

 

Natural Logarithms

Factorial

Integer Least Common Multiple

Integration in the VectorCalculus and MultivariateCalculus Packages

Natural Logarithms

In Maple 2020, the natural logarithm of large integers computes much faster and with less memory.

On an i7-8650U processor, Maple 2020 computes the following in about 14 seconds. Maple 2019, however, takes 17 minutes

restart:a2105nextprime104:lengtha

301240717

(1.1)

CodeTools:-Usagelna

1000700000ln2

(1.2)

This directly translates to performance gains in computing logarithms in all integer bases, as they work by computing natural logarithms.

Factorial

The factorial function is faster for large arguments. This case is about three times faster than in Maple 2019.

threemillion  3  106:

CodeTools:-Usagelengththreemillion!;

18128484

(2.1)

Integer Least Common Multiple

The integer least common multiple function (ilcm) has become much faster when called many times on smaller arguments. The following case is about ten times faster than in Maple 2019.

N 103:

memory used=62.21MiB, alloc change=-110.98MiB, cpu time=562.00ms, real time=538.00ms, gc time=62.50ms

Integration in the VectorCalculus and MultivariateCalculus Packages

The integration commands from the VectorCalculus and MultivariateCalculus packages (and the corresponding Student subpackages) now use the collapsed rather than the nested form for multiple integration. This allows the outer integration steps to use and benefit directly from the knowledge of the ranges of the inner integration steps.

This allows computation to complete more quickly for some examples, and to succeed in some examples which previously did not succeed or which required special assumptions to be made.

The following example now computes in under one second, on a machine where previously it took 100 seconds unless executed under the assumption that abs(y)<z .
withStudent:-MultivariateCalculus&colon;MultiInt4y2+z232+10y2+z2&comma;y=z..z&comma;z=0..1&comma;coordinates=cartesiany,z 

59π30

(4.1)

The following example now computes in approximately one second, whereas previously it used a prohibitively large amount of time and memory resources.
MultiIntxy&comma;x&comma;y&comma;z=Tetrahedron0&comma;0&comma;0&comma;1&comma;0&comma;0&comma;0&comma;1&comma;0&comma;0&comma;0&comma;1

π96

(4.2)

The following examples erroneously returned 0 in Maple2019.
withStudent:-VectorCalculus&colon;int&ExponentialE;x+yI1x+yI&comma;x&comma;y=Circle0&comma;0&comma;1

2π12+&ExponentialE;2

(4.3)

int&ExponentialE;xcosy&comma;x&comma;y=Circle0&comma;0&comma;1

π

(4.4)

 

The following example now computes in a few seconds, but did not complete in Maple 2019.
int1x2+y2+z2&comma;x&comma;y&comma;z=Sphere2&comma;0&comma;0&comma;1

πarcsinh4322+2ln3

(4.5)

The underlying structure of the returned inert form illustrates the change in behavior.
Exint1x2+y2+z2&comma;x&comma;y&comma;z=Sphere2&comma;0&comma;0&comma;1&comma;inert

Ex010π02πr2sinφ4rsinφcosθ+r2+4&DifferentialD;θ&DifferentialD;φ&DifferentialD;r

(4.6)

Int(r^2*sin(phi)/(4*r*sin(phi)*cos(theta)+r^2+4),[theta = 0 .. 2*Pi, phi = 0 ..
Pi, r = 0 .. 1])


Previously the inert form would consist of multiple, nested calls to Int.

Int(Int(Int(r^2*sin(phi)/(4*r*sin(phi)*cos(theta)+r^2+4),theta = 0 .. 2*Pi),phi= 0 .. Pi),r = 0 .. 1)