01-17-2008 04:04 AM
01-17-2008 04:30 AM
Because LabVIEW does dynamic memory allocation, the main causes for performance issues are continuous memory allocations and memory copies.
LabVIEW is very good at optimizing these, but you as the programmer are required to know where and when LabVIEW creates copies of data if you want an optimized program.
Here's a short list of some potential causes of memory allocations:
LabVIEW 8.5 added a couple of nodes and structures to allow even finer control of this.
If you want some relevant reading material, try searching for application note 168, which describes some of the issues. It's a bit old, but the concepts still apply.
01-17-2008 04:38 AM
01-17-2008 04:52 AM
01-17-2008 05:36 AM
01-17-2008 05:44 AM
01-17-2008 06:12 AM
01-17-2008 06:23 AM
01-17-2008 06:23 AM
In LabVIEW 8.x the answer to that question should be yes, but if what Andrey is showing is correct, it looks like it doesn't work perfectly. In any case, you should note that LV machine code is probably not as efficient as the code created from optimized C code (I'm talking about a case where the C code itself is optimized). You might wish to read some of these for more details, but you should note that they are also relatively old.
kimdino wrote:
If a constant (say 3) was supplied as the selector to a Case statement so that the code in the other cases would never be used. Would the compiler be intelligent enough to spot this and leave out the code for cases 0,1,2,4 etc from the built code.
01-17-2008 06:26 AM
Hi, Ton,
LabVIEW 8.5
Test project in the attachment. That was a quick test, probably something wrong. Anyway without constant - size of the executable is small, and wit unused constant increased.
regards,
Andrey