How to improve the running speed after converting to code by setting the properties in the Simulink model?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
After using the C coder to convert the model, I hope that the code can run as quickly as possible without affecting its functionality. Which settings in the properties should I consider? Can functions like inline functions or anything else have a certain effect? Because I found that checking or not to check the inline function function function can result in vastly different numbers and formats of generated files. So, will optimizing the code in this way cause some other unknown problems in code generation due to uncontrollable factors?
0 comentarios
Respuesta aceptada
Ganesh
el 6 de Ag. de 2024
Editada: Ganesh
el 6 de Ag. de 2024
The best way to go about your problem is to have a look at the Code Efficiency Page, for which I am attaching the documentation below:
Each parameter you set will affect your code depending on the model you are using.
If you are using Embedded Coder, you optimize the code in a generic fasion by setting the "Optimization Level" parameter to be "maximum". This would imply that the optimization is to be made keeping code generation parameters in mind. You could also go through the parameters specifically and understand if they will have an effect on your model or not. Do note that you will be disabling debugging by doing so. Attaching the documentation of "Optimization Level" parameter to give you a better understanding:
Hope this helps!
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!