Comment out block vs grounding signal

1 visualización (últimos 30 días)
Nishant Bhanot
Nishant Bhanot el 5 de Dic. de 2017
Respondida: Sebastian Castro el 26 de En. de 2018
Is there a computational difference / simulation performance difference between commenting a block out vs grounding the signal of that block? I am working with a huge model with hundreds of bus signals which are used by referenced subsystems based on which version of the referenced subsystem is being called for that particular simulation. Will there be any performance benefits of commenting out signals as right now I ground the bus signals I do not use. If the difference is marginal how big does the model need to be to start finding measurable performance difference of using one method over the other? Thanks

Respuestas (1)

Sebastian Castro
Sebastian Castro el 26 de En. de 2018
As far as I know, I don't think there is a difference.
In both cases, any block optimizations at code generation will remove unnecessary calculations that lead to grounds/commented-out blocks.
The best way to find out, though, is to try it yourself and look at the generated code :)
- Sebastian

Categorías

Más información sobre Subsystems en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by