Main Content


Reduce memory usage and improve execution speed of generated code

When developing Simulink® models from which you intend to generate code, use model configuration parameter to reduce RAM and ROM consumption and speed up code execution. If you want more defensive code, at the expense of some efficiency, you can disable one or more of these parameters.

You can configure code execution profiling to determine whether the generated code meets the real-time requirements of your target hardware and code sections that require memory usage or execution speed improvements. You can also use the Code Generation Advisor to check if a model’s current configuration is optimized for debugging or code execution.


Code Optimization Basics

Defensive Programming

Data Copy Reduction

Memory Usage

Execution Speed

Code Execution Profiling