User`s guide
Optimization Bundles
6-3
Optimization Bundles
All optimizatio ns are controlled separately, and you can enable or disable any
of the optimizations. To simplify the process, you can use the p rovided bundles
of Compiler settings that allow you to select the most common optimization
options. For more information on bundles, see “-B <filename> (Bundle of
Compiler Settings)” on page 7-43.
Turn On All Optimizations
To turn on all optim izat ions , use
-O all
This bundle i s store d in <matlab>/toolbox/compiler/bundles/
opt_bundle_all
. By default, all optimizations are on unless you specifically
disable t hem or use the
-g option for debugging. The -g op tio n d isable s all
optimization s .
Turn Off All Optimizations
To turn off all optimizations, use
-O none
This bundle i s store d in <matlab>/toolbox/compiler/bundles/
opt_bundle_none
. This o ptimi z ati on s etting is used w he nev er you use -g for
debugging .
Turn On Individual Optimizations
You ca n enable or d isable e ach individual optimizatio n. To enable/dis able an
optimization , u s e
-O <optimization option>:[on|off]
where <optimization option> is:
•
fold_scalar_mxarrays
•fold_non_scalar_mxarrays
•array_indexing
•optimize_integer_for_loops
•optimize_conditionals