LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best Circular Queue Implementation?


rex1030 wrote:

...

What do you think is going on under the hood with the rotate array function ben?


Hi Rex,

 

I can't speak for the rotate because I have not had a chance to bench-mark it since the secret surfaced about its capabilities. I'd have to sit done on a clean machine and do some benchmarking myself to be able to comment. My home machine is ancient and stuck at LV 8.5 and is not a good platform for testing low level performance like the rotate. That is why I'm following this thread in the hopes of finding out when where and how to use the rotate.

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 21 of 26
(2,069 Views)
All-

I setup a benchmark test on my system and found that the Rotate Array does not make a copy of the array and therefore does not require any additional LabVIEW memory space.  I did this by generating an array and watching the memory usage associated with LabVIEW in the Task Manager.  I know this is a crude method of benchmarking, however, with a 10,000,000 element array, it was pretty obvious.

Regards,

Mike S
NI AE
Message 22 of 26
(2,025 Views)

Could you post your benchmark code as 8.5 or lower or an image?

Quoting an old siganature of Michael Avialiostis "Talk is cheap, show me the code" Smiley Wink

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 23 of 26
(1,996 Views)

Take a look at this code.  I toggled the “Request Deallocation.vi” both keeping and removing the “Rotate 1D Array.vi”.  Then watch the Device Manager for memory usage under LabVIEW.  It’s the same whether the “Rotate 1D Array.vi” is in the code or not.

Regards,

Mike S
NI AE
Message 24 of 26
(1,968 Views)

rotate.PNG

 

Everything is folded (detemined at compile time). Check

  

Tools >>> Options Block Diagram

 

 

Show constant folding of Wires

Show Constant Folding of Structures

 

to see for yourself.

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 25 of 26
(1,960 Views)
Constant folding is something that our R&D department has been working on quite a bit lately.  Those of you using LabVIEW 2009, will not see the same slashed lines in the for loops.  Please take a look at the forum post for further information about Constant Folding and developments associated with this in newer versions of LabVIEW. 

LabVIEW Community: Constant Folding in 2009 vs. 8.2
http://forums.ni.com/ni/board/message?board.id=170&message.id=445216&requireLogin=False
Regards,

Mike S
NI AE
Message 26 of 26
(1,926 Views)