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

1 visualización (últimos 30 días)
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 comentarios
AJP
AJP el 4 de Jun. de 2011
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 el 4 de Jun. de 2011
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.

Iniciar sesión para comentar.

Respuesta aceptada

Walter Roberson
Walter Roberson el 4 de Jun. de 2011
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 comentario
AJP
AJP el 4 de Jun. de 2011
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.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by