From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unbundling multiple times vs unbundling once

Hey guys. 

 

If we are using the unbundle feature, does it make a difference to CPU usage if we unbundle once with multiple elements from the same unbundle, or if we use the unbundle feature multiple times in different areas of the same code (in the same structure for example)

 

we are running a relatively tight ship so any place we can save a few ticks would be useful

 

Thanks!

0 Kudos
Message 1 of 5
(2,567 Views)

Not that I have noticed.  Even in a tight situation, this would be so little gain.  You might want to look into an RT system and/FPGA to offload your CPU processing.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(2,540 Views)

This is an interesing question, Muri777.

 

As crossrulz mentions, the difference shouldn't really impact your performance in a significant way to have to worry about it.

 

Nevertheless, I did a little experiment myself, to check how these two ways of unbundling behave. It turns out that, at least in LabVIEW 2017, unbundling just once is twice as fast. I attach my VI in case you guys want to check it out by yourselves.

Cluster Benchmark.png

 

 

 

Message 3 of 5
(2,480 Views)

oscarfonseca wrote:

Nevertheless, I did a little experiment myself, to check how these two ways of unbundling behave. It turns out that, at least in LabVIEW 2017, unbundling just once is twice as fast. I attach my VI in case you guys want to check it out by yourselves.


Turn off debugging and they come out right about the same, at least within benchmarking noise.  Move the writing to the terminals to be after getting the time and it brings the values even closer together.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 5
(2,472 Views)

Those are good points, crossrulz.

 

Talking with some colleagues here, perhaps the 'performance' you will modify with the two methods discussed relies in CPU calls to/from the memory when getting the values for the cluster [especially in an RT target where there's no front panel, debugging disabled, and less OS jitter]. Given the speed at which processors work and perform these operations, it shouldn't really matter, indeed.

 

It was fun to try, though Smiley Very Happy

0 Kudos
Message 5 of 5
(2,467 Views)