Jump to content

How to optimise this code?


kaiserhaz

Recommended Posts

@Matteo Thanks. I'll have a look at that.

@Ruchir In your opinion, would the many 'if's affect the performance? I was specifically concerned with that because at almost each loop, there are a minimum of 4 conditions to test. In hardware terms, I'd have to use comparator blocks, and I'd rather save cost than using 4 of them.

Link to post
Share on other sites

my initial suggestion was if you could eliminate use of "wait" statement, that would definitely increase your run time performance and secondly 'if`s ' statement doesn't affect much in model activity, but yes, if you ask for this to embedded programmer. As every `if`s' break down to branches in assembly code and each "branch True" and "branch false" will have different cycle consume by CORE. So to improve performance programmer should predict flow in terms of utilization and provide condition in IF statement.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...