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

Maple 2019 improves the performance of many routines.

 

factor

Graph Theory

Group Theory

Real Root Finding

factor

Maple 2019 includes performance improvements for factoring sparse multivariate polynomials with integer coefficients. See factor for more details.

varsseqxi,i=1..8

varsx1,x2,x3,x4,x5,x6,x7,x8

(1.1)

grandpolyvars, degree=15,terms=50,coeffs=rand1000..1000

g555x14x2x32x53x62x7x82+771x14x2x3x42x63x84+584x13x2x34x6x76+930x13x43x5x63x7x84778x12x22x3x4x78x8642x12x32x42x5x66x7x8+897x12x42x6x75x8573x1x2x34x4x65x7x82+396x1x2x611x82+728x26x43x52x6x83981x25x3x44x7x8445x23x3x44x55x7x8173x22x3x43x66x7x82+369x22x53x64x75x8+190x2x45x53x7x85257x39x52x63x7+227x32x47x74x82+83x3x4x611x82+809x53x6x72x89921x16x23x45466x12x22x34x6x85265x12x22x52x65x72x8394x1x2x32x43x52x64x7+898x1x35x64x72x82916x1x4x68x73x8583x23x4x58x72932x34x710588x44x67x72x8+989x43x56x62x72x8+330x12x23x4x52x63x82+510x12x22x42x62x85+587x12x52x77x82+430x1x22x46x5x6x72+67x22x33x43x5x84296x13x26x3x4x7799x13x2x3x53x73x8+717x12x25x4x62x82+550x12x2x52x7x86417x12x32x4x54x6x82991x27x3x4x52x6672x22x32x4x65x72434x22x42x5x76x8+399x22x4x55x6x7x8223x2x36x42x6x7x8500x15x33x4x52630x1x2x3x46x6x7513x1x2x3x4x54x7x82+322x2x43x52x74x8933x3x44x53x8+545x52x6x75

(1.2)

hrandpolyvars, degree=15,terms=50,coeffs=rand1000..1000

h474x15x34x43x5x62+429x14x22x3x64x73x8188x13x2x32x43x63x72x8197x13x2x3x4x53x63x7x82464x12x2x33x43x6x74x8495x12x34x5x62x76+725x1x26x54x74+811x1x23x3x44x54x6x726x1x2x33x44x52x6x73+470x23x57x73x82+159x2x34x54x86631x15x23x3x44x7910x14x43x6x74x82+527x13x2x35x52x83+558x13x2x33x45x72168x13x44x63x84+920x12x26x42x73x8672x1x24x43x65x8+201x1x22x49x6x8+660x1x2x56x65x7+153x1x58x72x83628x26x3x43x53x8+771x23x42x59710x22x46x52x74+392x22x57x85+211x2x46x5x63x83997x33x4x55x62x7x82968x3x5x712160x14x22x52x85488x13x3x52x77+554x12x22x33x46687x12x2x42x5x63x72x82+665x1x23x33x43x83+870x22x36x53x7x8160x22x54x77+136x2x32x42x6x76x8487x14x2x35x5x8+549x1x23x32x43x5x62262x1x22x64x7x84+649x1x2x32x44x62x82+864x1x2x32x42x63x7x82+336x13x2x32x42x6x7x8679x1x2x33x4x53x7x8+871x22x37x4x7823x33x46x6x8+386x1x22x63x7x83373x2x54x63x8+511x12x2x4x72x82838x22x6x74x8124x23x4x5x7

(1.3)

fexpandgh:

The following factorization took about 5 seconds in Maple 2018 on the same machine.

CodeTools:-Usagefactorf

memory used=40.03MiB, alloc change=41.09MiB, cpu time=250.00ms, real time=247.00ms, gc time=0ns

474x15x34x43x5x62429x14x22x3x64x73x8+188x13x2x32x43x63x72x8+197x13x2x3x4x53x63x7x82+464x12x2x33x43x6x74x8+495x12x34x5x62x76725x1x26x54x74811x1x23x3x44x54x6x7+26x1x2x33x44x52x6x73470x23x57x73x82159x2x34x54x86+631x15x23x3x44x7+910x14x43x6x74x82527x13x2x35x52x83558x13x2x33x45x72+168x13x44x63x84920x12x26x42x73x8+672x1x24x43x65x8201x1x22x49x6x8660x1x2x56x65x7153x1x58x72x83+628x26x3x43x53x8771x23x42x59+710x22x46x52x74392x22x57x85211x2x46x5x63x83+997x33x4x55x62x7x82+968x3x5x712+160x14x22x52x85+488x13x3x52x77554x12x22x33x46+687x12x2x42x5x63x72x82665x1x23x33x43x83870x22x36x53x7x8+160x22x54x77136x2x32x42x6x76x8+487x14x2x35x5x8549x1x23x32x43x5x62+262x1x22x64x7x84649x1x2x32x44x62x82864x1x2x32x42x63x7x82336x13x2x32x42x6x7x8+679x1x2x33x4x53x7x8871x22x37x4x7+823x33x46x6x8386x1x22x63x7x83+373x2x54x63x8511x12x2x4x72x82+838x22x6x74x8+124x23x4x5x7555x14x2x32x53x62x7x82771x14x2x3x42x63x84584x13x2x34x6x76930x13x43x5x63x7x84+778x12x22x3x4x78x8+642x12x32x42x5x66x7x8897x12x42x6x75x85+73x1x2x34x4x65x7x82396x1x2x611x82728x26x43x52x6x83+981x25x3x44x7x84+45x23x3x44x55x7x8+173x22x3x43x66x7x82369x22x53x64x75x8190x2x45x53x7x85+257x39x52x63x7227x32x47x74x8283x3x4x611x82809x53x6x72x89+921x16x23x45+466x12x22x34x6x85+265x12x22x52x65x72x8+394x1x2x32x43x52x64x7898x1x35x64x72x82+916x1x4x68x73x8+583x23x4x58x72+932x34x710+588x44x67x72x8989x43x56x62x72x8330x12x23x4x52x63x82510x12x22x42x62x85587x12x52x77x82430x1x22x46x5x6x7267x22x33x43x5x84+296x13x26x3x4x7+799x13x2x3x53x73x8717x12x25x4x62x82550x12x2x52x7x86+417x12x32x4x54x6x82+991x27x3x4x52x6+672x22x32x4x65x72+434x22x42x5x76x8399x22x4x55x6x7x82+23x2x36x42x6x7x8+500x15x33x4x52+630x1x2x3x46x6x7+513x1x2x3x4x54x7x82322x2x43x52x74x8+933x3x44x53x8545x52x6x75

(1.4)

A larger example, with about 30000 terms.

fexpandmulrandpolyseqxj,j=1..12,degree=15,terms=30,coeffs=rand1..100000+i,i=1..3:

nopsf

29791

(1.5)

This factorization took more than 1 minute in Maple 2018.

FCodeTools:-Usagefactorf:

memory used=475.20MiB, alloc change=133.50MiB, cpu time=3.29s, real time=3.08s, gc time=468.00ms

nopsF

3

(1.6)

The last example is the determinant of a generic circulant matrix, i.e., where all entries are indeterminates, and each row is a cyclic rotation of the first one.

withLinearAlgebra: interfacertablesize=12:

AMatrix12,shape=Circulantseqxj,j=1..12

Ax1x2x3x4x5x6x7x8x9x10x11x12x12x1x2x3x4x5x6x7x8x9x10x11x11x12x1x2x3x4x5x6x7x8x9x10x10x11x12x1x2x3x4x5x6x7x8x9x9x10x11x12x1x2x3x4x5x6x7x8x8x9x10x11x12x1x2x3x4x5x6x7x7x8x9x10x11x12x1x2x3x4x5x6x6x7x8x9x10x11x12x1x2x3x4x5x5x6x7x8x9x10x11x12x1x2x3x4x4x5x6x7x8x9x10x11x12x1x2x3x3x4x5x6x7x8x9x10x11x12x1x2x2x3x4x5x6x7x8x9x10x11x12x1

(1.7)

fDeterminantA,method=minor:

nopsf

86500

(1.8)

This factorization took about 17 seconds in Maple 2018.

FCodeTools:-Usagefactorf:

memory used=488.25MiB, alloc change=-41.44MiB, cpu time=5.37s, real time=3.96s, gc time=421.20ms

nopsF

6

(1.9)

mapnops,opF

12,12,42,78,78,621

(1.10)

mapdegree,opF

1,1,2,2,2,4

(1.11)

expandfF

0

(1.12)

Graph Theory

In Maple 2019 the MaximumClique function of the GraphTheory package has new algorithms for computing the maximum clique of a graph and an option to choose the algorithm that you want to use, giving a huge performance boost on certain kinds of graphs. In the following example, Maple 2019 almost instantly finds the maximum clique of a graph that Maple 2018 needed over 3 minutes to find. In this case the "sat" method is used which translates the problem into Boolean logic and solves the resulting satisfiability problem using a SAT solver.

withGraphTheory:

filenameFileTools:-JoinPathkerneloptsdatadir,example,MANN_a9.clq

filenameE:\Maple2019\data\example\MANN_a9.clq

(2.1)

GImportGraphfilename, 'dimacs'

GGraph 1: an undirected unweighted graph with 45 vertices and 918 edge(s)

(2.2)

DegreeSequenceG

40,40,40,40,40,40,40,40,40,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41,41

(2.3)

CCodeTools:-UsageMaximumCliqueG,method='sat'

memory used=10.44MiB, alloc change=28.99MiB, cpu time=187.00ms, real time=152.00ms, gc time=62.40ms

C2,3,4,6,10,14,17,20,24,25,30,33,36,39,41,45

(2.4)

numelemsC

16

(2.5)

Group Theory

• 

Arithmetic and other low-level operations for permutations have been completely re-written in compiled kernel code. In addition, the memory overhead of permutations has been considerably reduced.

• 

For example, the following call to PermOrder took about 200 times longer in Maple 2018.

withGroupTheory:

pPermcombinat:-randperm105:

PermOrderp

47396163561937236086040

(3.1)
• 

Timing details will of course vary from one machine to another, and depend also upon the random state of the Maple session. But, reproduced here are some representative calculations run in a fresh Maple 2018 session,  on a particular 64-bit Linux workstation.

LCodeTools:-UsageseqPermcombinat:-randperm104,i=1..1000:

CodeTools:-UsagePermProductopL:

memory used=307.57MiB, alloc change=288.00MiB, cpu time=9.78s, real time=8.36s, gc time=1.75s

(3.2)

CodeTools:-UsagemapPermOrder,L:

memory used=2.54GiB, alloc change=96.00MiB, cpu time=52.62s, real time=40.96s, gc time=13.75s

(3.3)

CodeTools:-UsagemapPermInverse,L:

memory used=0.74GiB, alloc change=320.00MiB, cpu time=19.56s, real time=14.66s, gc time=5.71s

(3.4)

CodeTools:-UsagemapPermCycleType,L:

memory used=0.84MiB, alloc change=0 bytes, cpu time=152.00ms, real time=149.00ms, gc time=0ns

(3.5)

CodeTools:-UsagemapPermPower,L,3333:

memory used=4.53GiB, alloc change=2.22GiB, cpu time=3.78m, real time=2.17m, gc time=113.08s

(3.6)
• 

And here are the same calculations run in a fresh 2019 session on the same machine. It is apparent that both time used an memory consumption have been considerably reduced.

LCodeTools:-UsageseqPermcombinat:-randperm104,i=1..1000:

memory used=77.16MiB, alloc change=59.42MiB, cpu time=1.10s, real time=1.10s, gc time=8.00ms

(3.7)

CodeTools:-UsagePermProductopL:

memory used=77.85MiB, alloc change=0 bytes, cpu time=592.00ms, real time=587.00ms, gc time=24.00ms

(3.8)

CodeTools:-UsagemapPermOrder,L:

memory used=8.08MiB, alloc change=3.01MiB, cpu time=204.00ms, real time=203.00ms, gc time=0ns

(3.9)

CodeTools:-UsagemapPermInverse,L:

memory used=77.30MiB, alloc change=-1.00MiB, cpu time=568.00ms, real time=560.00ms, gc time=16.00ms

(3.10)

CodeTools:-UsagemapPermCycleType,L:

memory used=214.05KiB, alloc change=0 bytes, cpu time=124.00ms, real time=125.00ms, gc time=0ns

(3.11)

CodeTools:-UsagemapPermPower,L,3333:

memory used=77.81MiB, alloc change=0 bytes, cpu time=764.00ms, real time=752.00ms, gc time=36.00ms

(3.12)

Real Root Finding

The RootFinding:-Isolate command has a new algorithm for univariate polynomials that is much faster for ill-conditioned problems and high accuracy solutions. See Real Root Finding for details.