- You can use the “Code Generation Advisor” to analyse the model for code efficiency. You can select multiple objectives and prioritize them. The advisor gives recommended actions that can limit efficiency objectives.
- Make use of “Clone Detector” to identify clones in your model that have identical block and connections which can lead to inefficient code generation.
- You can generate “static metric report” which performs static analysis on the generated code. You can get insights to various things like stack usage per function, review global variables per function, possible performance slow points etc.
Remogenerate optimized code by removing code for out-of-range floating point to integer conversions did not improve execution speed,is there a problem?
조회 수: 2 (최근 30일)
이전 댓글 표시
I want to improve the running speed of the code converted from Simulink to C coder, so I tried setting the maximum running speed mode in it, but the result was similar to balancing RAM and speed mode. So I tried to modify more detailed settings, I tried to modify the settings to regenerate optimized code by removing out of range floating-point to integer conversion code, but still had no effect. Why is this? Is there any other setting in the model that can improve the running speed of the code? Or should I directly modify the structure of the code to improve speed?
댓글 수: 0
채택된 답변
Jatin
2024년 8월 20일
Using the optimization technique of “removing out of range floating-point to integer” may not always give the required optimization specially if they are minimal compared to the other parts of your code.
Consider trying these methods and see if this helps you in improving your code performance.
You can refer to all the relevant documentations using the links below:
Apart from this you can try profiling tools to analyse the performance of your generated code using the given link:
Hope this was of help.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Manual Performance Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!