Does MATLAB 2010b provide JIT acceleration support for structures and cell arrays?

조회 수: 1 (최근 30일)
I have several functions and scripts that either:
- output cell arrays of vectors OR matrices - operate on cell arrays of vectors OR matrices - output on single-level structures of vectors OR matrices - operate on single-level structures of vectors OR matrices
Will the JIT be speeding up my code in any of these cases?
If I want performance enhancement will I have to rewrite my code to work with standard arrays?
  댓글 수: 3
AJP
AJP 2011년 6월 4일
I wasn't suggesting I edit the JIT compiler! Just my own scripts and/or functions so that they could exploit it's advantages.
Walter Roberson
Walter Roberson 2011년 6월 4일
Jan meant that it was not advisable to tune your code according to the characteristics of the JIT of the version you have now, as next version the JIT might favor something else.

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

채택된 답변

Walter Roberson
Walter Roberson 2011년 6월 4일
Yes, JIT will work in all of those cases.
What might turn out to have more effect, though, is the way you use the outputs. If you are going to take (say) the 5th entry of each row vector, then a matrix is more efficient to work with, but if you are going to be extracting a sublist of each row where the sublist varies across the rows, then one must keep in mind the heuristic that the less memory that has to be copied around, the faster one goes. Matters are going to depend upon how often one does the access operations... e.g., if one is going to take the output per-row multiple times then splitting by rows into cell arrays would result in faster access than repeatedly accessing rows from a matrix.
The JIT is not always the primary determiner of execution speed.
  댓글 수: 1
AJP
AJP 2011년 6월 4일
Thanks Walter. Yes indeed there are probably hundreds of ways to speed up my code, not just exploiting JIT behaviour, but at least I'm getting some benefit from it!
Best, Adam.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by