04-26-2006 03:43 PM
04-26-2006 04:36 PM
04-26-2006 04:56 PM
@jarrod S. wrote:
LabVIEW does make auto-indexing in a While Loop as efficient as possible by allocating memory in large chunks and then discarding unused portions after the loop finishes running. This helps LabVIEW go through the process of memory allocation as infrequently as possible. It's a good compromise, and worth noting. 😉
At the risk of quoting stale information, here's how LabVIEW did this in 1999:
http://forums.ni.com/ni/board/message?board.id=170&message.id=6685#M6685
🙂
04-27-2006 08:22 AM
04-27-2006 06:40 PM
04-27-2006 07:48 PM
04-27-2006 07:50 PM
05-02-2006 02:57 PM
05-03-2006 10:32 AM
OK, I took a quick stab at it and got it about 5.3x faster than your version. (280ms vs 1.5 seconds on my slow laptop)
I still don't uderstand the reasoning of multiple loops. LabVIEW is always multithreaded and since your queues are size=1, things need to execute in order anyway. You are just creating extra data copies of large arrays. Are you running on some fancy multi-CPU hardware? (Even then it might not make a difference. LabVIEW usually does a great job arranging the code execution. Trying to micromanage this has no benefit)
There are some extra comments on the diagram (LabVIEW 8.0). Modfy as needed. I currently left it at two loops, but you could even combine all into one.
09-12-2018 05:19 PM
altenbach you are putting it all in one loop reduced the execution time to 35ms from 50ms on my machine