User`s guide
6 Optimizing Performance
6-10
Optimizing MATLAB Arrays
Scalars
(percolate_simple_types) This optimization reduces the strength of
operations on simple types (scalars) by reducing operations to scalar double
operations whenever possible. For example, if your code uses
sin(v) and v is
known to be double and scalar, this optimization uses the scalar double
sin
function. This optimization is always on when compiling to C/C++ and cannot
be disabled. It is provided for compatibility with P-code generation.
Scalar Doubles
(speculate) This optimization is similar to the technology used by MATLAB to
accelerate scalar double math operations. It makes educated guesses about the
type of MATLAB arrays, and optimizes the code accordingly. This optimization
can have dramatic impact on scalar double MATLAB code and more modest
impact on small array operations. This optimization is off by default.