Main Content

Compiler optimization level

Description

Sets the degree of optimization used by the compiler when generating code for acceleration, Stateflow®charts,MATLAB Functionblock, andMATLAB Systemblock.

Category:Simulation Target

Settings

Default:Optimizations off (faster builds)

Optimizations off (faster builds)

Specifies the compiler not to optimize code. This results in faster build times.

Optimizations on (faster runs)

指定编译器生成optimized code. The generated code will run faster, but the model build will take longer than if optimizations are off.

Tips

  • The defaultOptimizations offis a good choice for most models. This quickly produces code that can be used with acceleration.

  • SetOptimizations onto optimize your code. The fast running code produced by optimization can be advantageous if you will repeatedly run your model with the accelerator.

Command-Line Information

Parameter:SimCompilerOptimization
Value:'on'|'off'
Default:'off'

Recommended Settings

Application Setting
Debugging No impact
Traceability No impact
Efficiency No impact
Safety precaution No impact

Related Topics