01-30-2018 05:05 PM
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!
01-30-2018 06:33 PM
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.
01-31-2018 09:19 AM
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.
01-31-2018 09:49 AM
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.
01-31-2018 10:04 AM - edited 01-31-2018 10:05 AM
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