New MATLAB R2015b has huge overheads when calling script files?
Ältere Kommentare anzeigen
I have a function that calls matlab script (not function!) inside it. I found that in this case R2015b is 10–40% slower comapring to R2015a. The problem is in the lines when the script files are called. The profiler shows interesting results: the line
my_script
takes 59 seconds, while the script itself (my_script.m) takes only 23 seconds to execute. (R2015a shows adequate results: 27 and 26 seconds for the code line and the script itself)
I guess the problem is with the new JIT. Is it not a good practice anymore to use scripts?
3 Kommentare
Walter Roberson
am 14 Sep. 2015
It has been close to a decade since it was good programming practice to use scripts in MATLAB.
Dmitry
am 14 Sep. 2015
Guillaume
am 14 Sep. 2015
I believe it's been the other way around for a while. There's no (or little) JIT optimisation in scripts, and full optimisation for functions.
Antworten (0)
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!