New MATLAB R2015b has huge overheads when calling script files?

조회 수: 2 (최근 30일)
Dmitry
Dmitry 2015년 9월 14일
댓글: Guillaume 2015년 9월 14일
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
Dmitry
Dmitry 2015년 9월 14일
If I am not mistaken, until the recent release the overheads in functions were high (comparing to scripts). This is the reason I used scripts in low-level computation-intensive parts of the code.
Guillaume
Guillaume 2015년 9월 14일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by