Question: Behaviour of forget: Maple 2015 vs Maple 2018

Hi everybody,

Maybe it's more a warning than a true question ?

I have written a rather heavy-duty code in Maple 2015. A few years ago I faced strong problems of increases in memory. After some investigations I found there came from a procedure P in which a loop realizes a few tenth of calls to  fsolve.
This same procedure  P was itself called a large number of times.

To try to  fix them I inserted a forget(fsolve, initialize=true) command after the fsolve command.
At the end this didn't prove to be very efficient and I decided to rewrite some part of the code in a more efficient way. Basically the  procedure  P is now called only a few times but its inner loop is executed about 200 hundred times.
This new version of the code no longer presents memory size problems, while being more efficient from a computational time point of view.

Today procedure  P still contains the forget(fsolve, initialize=true) command (I had forgotten to remove it)

Now I keep developping this same code under Maple 2018.
The Maple 2015 and Maple 2018 versions both return the same results, but the procedure  P runs in about 20 times the time it runs in Maple 2015 (40 seconds instead of 2)
This comes from the 200 forget(fsolve, initialize=true) calls which consumme about  38 seconds.

With Maple 2015 these same 200 calls to forget(fsolve, initialize=true) only consumme 0.5 second:


As a cure I remove the forget(fsolve, initialize=true) command, plain and simple.

But maybe this misadventure could reveal an unseen behaviour of Maple 2018 ?

 

Please Wait...