Comment out block vs grounding signal
1 view (last 30 days)
Show older comments
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
0 Comments
Answers (1)
Sebastian Castro
on 26 Jan 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
0 Comments
See Also
Categories
Find more on Subsystems in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!