LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Code golf: stop two while loops with guaranteed iteration ratio

Solved!
Go to solution

Timed loops makes this challenge trivial.

 

Target one each to two CPUs and specify the same start time ant their unique timing values.

 

IN the event either or both "Finish Late" an ay iteration, the Timed Loop will detect same.

 

Use queus to buffer the data.

 

Pre-write them with data before the loops start so they do not have to wait on memory allocations.

 

Pre-write your file to the proper size before the test starts so it does not have to wait for disk allocations. WHen done writting the file truncate the file to the actual length.

 

Also look at these suggestions.

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 11 of 12
(322 Views)

Ben wrote:

 

Timed loops makes this challenge trivial.

 

Target one each to two CPUs and specify the same start time ant their unique timing values.

 

IN the event either or both "Finish Late" an ay iteration, the Timed Loop will detect same.

 

Use queus to buffer the data.

 

Pre-write them with data before the loops start so they do not have to wait on memory allocations.

 

Pre-write your file to the proper size before the test starts so it does not have to wait for disk allocations. WHen done writting the file truncate the file to the actual length.


In my situation, I've implemented that last three. If you haven't seen the sysinternals performance tools (contig and friends), then check them out 🙂 I cannot implement the first since the host only has a Pentium 4 processor :-S

0 Kudos
Message 12 of 12
(292 Views)