LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Performance of passing data into subVI's using clusters

Good morning all,
I am trying to get a handle on making better labview code. I have a good feel for the syntax, but have been lacking the system design knowledge to make clean, efficent, easy to maintain VI's. So I made some test VI's to get my hands on the pros and cons of passing data to subVI using clusters. The main driver is my desire to pass clusters directly into my subVI to make my top level VI's relativly small and easy to read. The purpose of this post is to share my results and to get some feed back on my method.
 
System Parameters
Intel Pentium M @1.8GHz
Windows 2k
Labview 7.1.1
 
Test Cases
My two test cases are (1) unbundling/bundle outside the subVI and passing the parameters directly and (2) passing the cluster into the subVI and letting the subVI handle all the unbundling/bundling.
 
Setup
I have two subVI's. One that does some simple math calculations and another that does some string manipulation. Each of the subVI runs for 500000 loops per one iteration of the main loop. The mainVI runs for 1000 loops. In order to remove the inherent variablility of the the CPU, I ran each mainVI 5 times.
 
Results
The unbundle outside subVI's test returned the following elapsed times: 7.959, 7.804, 7.840, 7.805, and 7.904 seconds. The unbundle inside the subVI's test gave: 7.769, 7.597, 7.607, 7.693, and 7.603 seconds.
 
Observations
I definitly expected the unbundle/bundle outside the subvi's to be faster based on other messages on the forum. But I guess I am a little supprised that there is not more difference. In this case, about 3%. Another interesting observation is the the first run taking a bit longer the the rest of the runs. Is there some DLL or something loading into memory on that first run?
 
Questions
Is my methodology for running this test sound? Are there any other important configuration of this basic idea that are important to look at?
 
 
 
I look forward to peoples comments.
Thanks
0 Kudos
Message 1 of 2
(2,575 Views)

Please start by reviewing this thread.

I'll check back to see if you still have questions.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 2
(2,567 Views)