User`s guide

6
Optimizing Performance
The MATLAB Compiler can perform various 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.
MATLAB Compiler 3.0 provides a series of optimizations that can help speed up your compiled code.
This chapter describes the optimization options.
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.
Optimization Bundles (p. 6-2) Bundles that allow you to select the most common
optimization options
Optimizing Arrays (p. 6-4) Improving the performance of code that manipulates
scalar arrays
Optimizing Loops (p. 6-6) Improviing the performance of simple one- and
two-dimensional array index expressions
Optimizing Conditionals (p. 6-9) Reducing the MATLAB conditional operators to scalar C
conditional operators
Optimizing MATLAB Arrays (p. 6-10) Accelerates scalar math operations