Why Matlab 2017a needs twice more time than 2014a to run the same code?

Dear all,
I have a code, which in 2014a took 16 hours to run. There is a lot of parfor loops, which works smoothly. The same code, with identical data needed 30 hours to run.
Could anyone please explain me why? What can I do, to work it faster? I heard, that 2017 versions are supposed to be faster... So, what's wrong?
Thank you in advance for any clues.

4 Comments

Could anyone please explain me why?
The obvious explanation is that your code is processed slower in R2017b. A more detailed answer requires, that you post any details about the code. Use the profiler to find the bottleneck and and the part, which causes the slowdown. Otherwise it is impossible to guess, what's going on.
I will have a look into the profiler and compare them. Why I haven't think about that earlier... Thanks!
Dear Jan, I run the part of my code in Matlab 2017a and wanted to see how the code will behave with only 2 datasets. I started it on Friday, and today, Monday morning it was still not finished. I enclose the pront screens from the profiler. The only thing which I'm guessing, is some issue with java.util.concurrent.LinkedBlockingQueue function, and then with that remoteparfor>remoteparfor.getCompleteIntervals Do you know by any chance, how to solve such a problem?

Sign in to comment.

 Accepted Answer

I would suggest you contacting Mathworks' technical support for this. If you could provide your example data, I am sure they will be able to find out why and possibly provide a solution. I had a similar issue where it took much longer in R2015b to finish a script than in R2014b. It turned out that there is some optimization in MATLAB R2015b that inadvertently slows down a particular use case. The tech support found the root cause and the problem was resolved in R2016b.

3 Comments

Thank you! Unfortunately, I can't provide the data, since they are confidential, but I will definitely contact technical support.
No, never. They adised me to switch to the newest version of Matlab. And indeed, I didn't have this problem in the newer version.

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!