09-11-2008 11:57 PM
Tushar Jambhekar
tushar@jambhekar.com
Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog
09-12-2008 12:30 AM
Tushar Jambhekar wrote:
I am not using LV8.5 but in case of labview 8.5 those constants can be converted to controls to avoid constant folding.
the timinmgs i have given are my actual observations
Folding existed way before LabVIEW 8.5. Disable debugging and the times will drop to zero due to folding. I guess the debugging code is slowing down the execution. You are not really measuring any real algorithm.
Still, things are not that simple. Once you change your constants to controls, you add the overhead of reading the controls and if you place the controls before the loop, they will get folded inside the loop.
Doing meaningful benchmarks is very difficult as you just learned. You need to carefully design all aspects of the code to ensure useful results that actually mean something.
Tushar Jambhekar wrote:
Ben i agree with you that time taken for calculations can be dependant on specific hardware used. and i was not surprised because of the absolute time taken for calculations. i was surprised by the VARIATIONS between several runs of the same code, on same machine
This is also no surprise under a multipurpose OS. You can minimize the variations by increasing the VI priority.