|
Re: Create single file for empirical values in labview
Global variables are quite efficient. Write a test to see how long it takes to read a million of something. On the mac laptop I'm using, an empty for loop took 2ms for 1 million iterations. Adding a double precision constant makes it 5. Changing that to a control terminal is also 5. Using a control local makes it 75, and using a global upped it to 77.
All of this was with debugging turned off for the VI. So you have a few nanosecs for this in most cases and when using something that could change at any time and doesn't have optimizations will use more like 70 nanosecs. You can afford that if you do any calculations at all.
By the way, when doing tests like this, avoid using constants for things like loop iterations. If it can, LV will optimize your entire loop to run at compile time to give you unbelievable numbers.
Greg McKaskle
|