User`s guide
6 Optimizing Performance
6-2
The MATLAB Compiler can perform several different optimizations on your
M-file source code that can make the performance of the generated C/C++ code
much faster than the performance of the M-code in the MATLAB interpreter.
Compiler 2.1 provides a series of optimizations that can help speed up your
compiled code. The optimizations improve performance when:
•Your code manipulates scalar or nonscalar arra ys.
•Your code contains simple one- and two-dimensional array indexing.
•Your code contains loops that start and increment with integers.
•Your code contains conditional expressions where bother operands are
integers.
The only times you would choose not to optimize are if you are debugging your
code or you want to maintain the readability of your code.