Performance - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Performance

 

Updates to Maple 18 have greatly improved performance and efficiency in several key categories. Improvements in performance and efficiency include:

• 

Faster computation speeds for many basic operations on large integers due to an update to a new version of GMP

• 

The integration of the LLVM compiler framework resulting in faster compile times and more efficient generated code

• 

Significant speed improvements and expanded degree ranges for multivariate polynomial operations

• 

Efficiency improvements in numerical linear algebra

• 

Linear combinations of matrices and vectors are much faster

• 

Significant speedups working with the Bessel and Hankel special functions

• 

The sort command takes advantage of multiple cores making sorting much faster

• 

Performance improvements for drawing graphs in Graph Theory

 

Faster High Precision Computations

Integration of LLVM

Improvements for Polynomials

Linear Algebra - Singular Values

Linear Combination Efficiency

Hardware and Special Functions

Improvements to the sort Command

Graph Theory

See Also

Faster High Precision Computations

In Maple 18, we upgraded the version of GMP, the GNU Multiple Precision Arithmetic Library, used for the Maple engine to 5.1.1.  This greatly improves performance for new CPUs, as well as improves optimizations for existing platforms, especially 64-bit platforms.

kernelopts gmpversion ;

5.1.1

(1.1)

The following figure shows the difference in performance between Maple 17 and Maple 18 for basic operations that utilize the GMP. This operated on a Intel 64-bit i7 processor.

Integration of LLVM

Maple 18 has incorporated the LLVM compiler infrastructure to provide an out-of-the-box solution for the native code compilation feature of the Compiler:-Compile command. The addition of LLVM offers many advantages over previous releases.

LLVM is built directly into the Maple kernel rather than existing as a separate process that is called from Maple to perform the compilation task. This tight integration of the compiler provides the primary advantage over previous releases. Specifically, this streamlines calls to Compile since the overhead of creating a secondary process is eliminated. When compiling a procedure the resulting machine code is generated directly into main memory where it can be executed. In prior releases, Maple created a dynamically linked library which was then loaded prior to execution. The integration of LLVM reduces the number of costly disk accesses.

Furthermore, LLVM was designed to be used in this situation and is therefore capable of producing efficient machine code in a quicker, more lightweight manner.

The following figure displays the improvements in both compile and run time of Maple 18 in comparison to Maple 17 (64-bit Windows).

 

Improvements for Polynomials

Efficiency improvements in Maple 18 have resulted in significantly faster performance for large polynomial operations. For more details, see Improvements in Polynomials.

Linear Algebra - Singular Values

Floating-point computation of the singular value decomposition of a matrix has been upgraded to use a divide and conquer implementation based upon the DGESDD routine of CLAPACK. This brings a performance gain for both the SingularValues and the LeastSquares commands.

The following graph was produced by using the LeastSquares command with option method=SVD on double-precision datatype=float[8] matrices and single right-hand-side vectors, running in 64-bit Linux on an Intel i5 760 2.80Ghz machine.

 

 

 

 

Linear Combination Efficiency

Maple 18 features performance updates that make arithmetic operations such as taking linear combinations of matrices or vectors much faster. The table below shows performance changes for 12 sample calculations.

 

1

2

3

4

5

6

7

8

9

10

11

12

Maple 17

41.858

4.748

2.704

0.204

9.112

7.120

1.112

0.016

78.548

29.741

32.430

29.753

Maple 18

0.280

0.272

0.004

0.008

0.001

0.284

0.832

0.004

0.236

0.256

0.256

0.252

Speed Up Factors

149

17

676

26

9112

25

1.3

4

333

116

127

118

 

Code for testing

 

Maple17Values 41.858, 4.748, 2.704, 0.204, 9.112, 7.120, 1.112, 0.016, 78.548, 29.741, 32.430, 29.753 :

Maple18Values   0.280, 0.272, 0.004, 0.008, 0.001, 0.284, 0.832, 0.004, 0.236, 0.256, 0.256, 0.252:

SpeedUpFactors  Maple17Values /~ Maple18Values

SpeedUpFactors149.4928571,17.45588235,676.0000000,25.50000000,9112.000000,25.07042254,1.336538462,4.000000000,332.8305085,116.1757812,126.6796875,118.0674603

(5.1)

Statistics:-ColumnGraphMaple17Values,Maple18Values,legend=Maple 17,Maple 18;

Hardware and Special Functions

The Bessel functions BesselJ, BesselY, BesselI and BesselK, and the Hankel functions HankelH1 and HankelH2, have been added to Maple's core library of compiled special functions, for use in the evalhf environment. This results in significant efficiency improvements for operations such as plotting expressions involving Bessel functions. As a sample:

V  Array0..200,i100.+i3.141593,datatype=float8:

X  Array0..200,i100. + i2.71722.8, datatype=float8:

st  time: Array0..200,0..200,i,jBesselJVi,Xj, datatype=complex8: timest;

1.780

(6.1)

Improvements to the sort Command

In Maple 18, sorting is much faster due to parallelization of the sorting algorithms and the option of key sorting. The following graph shows the timing difference between sorts of random permutations run in Maple 17 and Maple 18.

For more details on the improvements to sort, see the Language and Programming updates page.

Graph Theory

Updates to the GraphTheory package have resulted in improved performance in the DrawGraph command for large graphs. This is the result of subroutines GetEdgesColor and GetEdgesThickness using sparse Matrices when the graph is sparse. The following table shows timing for some examples. For more details, see the Updates in Graph Theory page.

 

Performance comparison

Graph

Maple 18

Mathematica® 9

CycleGraph(10^3)

0.124 s

0.235 s

CycleGraph(10^4)

1.140 s

2.226 s

CycleGraph(10^5)

18.10 s

27.59 s

See Also

What's New in Maple18