06-15-2010 01:24 PM
I'll provide the answer if nobody replies but I'll let y'all discover this yourself.
Have fun,
Ben
Solved! Go to Solution.
06-15-2010 01:39 PM
Hint:
"Loop invariant code motion" invalidates suggestion we often suggest to people trying to optimize the perfomance of their loops.
Ben
06-15-2010 01:45 PM
Hi Ben,
thanks for having Wikipedia
And: No, I wasn't aware of something like this in LabVIEW... And I always move constant code outside of loops...
06-15-2010 02:00 PM
And we have a winner for this afternoon's game!
For those that do not have access to the Wiki...
If the LV compiler "sees" you have code in a loop that produce the same answer for every iteration it CAN move that code to execute before the loop.
Ben
06-15-2010 02:03 PM
If the LV compiler "sees" you have code in a loop that produces the same answer for every iteration it SHOULD throw up a dialog that says "IDIOT!"
06-15-2010 02:07 PM
Ben wrote:
If the LV compiler "sees" you have code in a loop that produce the same answer for every iteration it CAN move that code to execute before the loop.
Ben
I assume this only works with debugging off in a manner similar to the removeal of structures with no outputs. can you confirm?
Also a link to your source would be nice- I'd like to know a bit more about this compiler feature.
06-15-2010 02:28 PM
Ben wrote:
If the LV compiler "sees" you have code in a loop that produce the same answer for every iteration it CAN move that code to execute before the loop.
Can, or does?
06-15-2010 02:33 PM
elset191 wrote:
Ben wrote:
If the LV compiler "sees" you have code in a loop that produce the same answer for every iteration it CAN move that code to execute before the loop.
Can, or does?
Just what I was about to ask.
06-15-2010 02:35 PM
elset191 wrote:
Ben wrote:
If the LV compiler "sees" you have code in a loop that produce the same answer for every iteration it CAN move that code to execute before the loop.
Can, or does?
I softened the first post but after a re-read it DOES.
The only reference I have is "LabVIEW Performance 2009 Course Manual" Part number 325501A-01 April 2010 Edition, Page 1-32."
Ben
06-15-2010 04:03 PM
Ben wrote:
The only reference I have is "LabVIEW Performance 2009 Course Manual" Part number 325501A-01 April 2010 Edition, sample here
Page 1-32." is not encluded in the sample
Ben
Any other neat features hidden in the manual- or do I need to by the class