0
Answered

How to accelerate the advanpix code ?!

SomeOne 7 aastat tagasi uuendaja Pavel Holoborodko 7 aastat tagasi 6

Hello! is there anyway to accelerate the advanpix code , it takes too long time to run, any suggestions ?!

I would say it is difficult to provide  a minimal code because all functions are being used , but I would like to know if I precalculate all  data in order to make the code faster  then at the main script I just convert them into 'mp' in order to get the output as 'mp' would the results be the same as if all data are computed from the very begining as 'mp' ? if not what is the difference between them ? what is gained and what is lost? 

Thank you!

Answered

It depends on situation. In general it is better to compute everything as 'mp' from the onset. 

But in some cases, e.g. ill-conditioning is localized only in one operation or your data came from real world measurements (and thus in low-precision) - then 'mp' can be applied only at some particular place.


Knowing nothing about your problem, I would suggest to try both ways and see the difference.

And, of course, I would also suggest to use powerful computer with multi-core CPU, etc. 

Laptops are not usable for any serious computations (if you happen to use the one).

thank you very much! just one more thing ,at your opinion when using the low - precision data and converting it into 'mp', which aspect is dominante on this data ? I believe that the low-precision feature will remain , isn't ?!

Please check this section in our User Manual:

https://www.advanpix.com/documentation/users-manual/#More_on_Existing_Code_Porting


It shows few examples of difference between precision & accuracy.