Code Efficiency
Once you are ready to generate code, use model configuration settings to improve code efficiency. These settings 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 these options.
You can run the current configuration of a model against one or more of the objectives available in the Code Generation Advisor. Based on your objective selections and prioritizations, the Code Generation Advisor offers changes that you can make to your model configuration settings. To get you started with code optimization basics, see Design Techniques to Optimize Models for Efficient Code Generation.
Categories
- Memory Usage
Optimize use of RAM, ROM, and stack space by generated code
- Execution Speed
Improve execution speed of generated code
- Data Copy Reduction
Adjust model parameters to improve code execution speed and reduce memory usage
- Code Replacement
Customize code generated from a model by using a code replacement library
- Code Efficiency Tradeoffs
Make tradeoffs when generating optimized code