We have converted several Mathcad 15 sheets to Mathcad Prime 8 and are now seeing very slow performance, particularly when doing file opening and saving pdf. Opening a Mathcad file, recalculate it and print it to pdf earlier took around 30 seconds per file, now it takes 2-5 minutes.
Can you please share any tips or tricks of your own experience on improving speed in Mathcad Prime 8?
Unfortunately, I can't offer any tips on how to mitigate these shortcomings in Prime.
Prime's slowness in processing and sometimes quite cumbersome operation has been criticized here in the forum already several times. Unfortunately, however, no significant solutions to speed up could be offered.
Your comments sure make sense, are quite detailed and solid and if you still have some faith in PTC and the software developers and have not yet completely lost hope for improvements in future versions, you could try to contact PTC directly with this by opening a support case.
It's a fairly strong laptop, running Windows 10 64-bit on Intel Core i7 2.60 GHz and with 64 GB memory.
The slowness occurs also for Mathcad files that are stored on the desktop (i.e. it's not due to network lagging).
1. Have you already opened a new "Case" in the technical support service?
"Mathcad Installation & Licensing Support Center":
There are ways to speed up Prime.
I use what are called "masks" where vectorized statements are faster than sloppily written for loops and if statements.
In the enclosed "b" is the mask. Speed increase is significant for big data sets.
I use this technique on datasets of 193819 x 9 and it makes a difference.
Cool, thanks a lot for that helpful suggestion, giving 40% speed increase in your example. We actually have a lot of formulas that should be able to be vectorized!
I guess that the main speed gain stems from avoiding the if-statement.
To compare the loop vs. vectorization you should use something like
Of course multithreading must be turned off to get a meaningful execution time 😉
OK, I gave it a try with a different timing method (and with an obviously slower machine) and the results seems to differ not that much and looping is slightly faster here than vectorization!?
Not sure if I am overlooking something ...
Multithreading sure has to be turned off here, too.
I attach the sheet for you to give it a try, too.
Sorry for the late reply, I'll try to enable my community notifications without being spammed. Thanks for the input and also demonstration of vectorization and functions of functions. I have changed your sheet and reattached two new versions. In both versions, I have used the average calculation time for 10 runs of each routine, and added routines f4 and f5, where vectors are pre-populated with zeros. In version A, I have also deleted the c vectors. The conclusion for my PC: