LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

API calls in a for loop (or not).

Which one of the two methods (top or bottom) would you think is more efficient / best performance (faster)?

 

thanks in advance!

Richard






0 Kudos
Message 1 of 6
(3,447 Views)
The bottom one since Mean.vi is reentrant.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 6
(3,444 Views)
Of course in the top one you should be autoindexing the for-loop. Smiley Wink
Message 3 of 6
(3,432 Views)

Adnan Z wrote:
The bottom one since Mean.vi is reentrant.

Excellent! Sometimes smaller / more compact isn't necessarily better.

Richard






0 Kudos
Message 4 of 6
(3,426 Views)

Provided there are resource contentions and the parallel function play nice together, a bunch of parallel paths will almost always run faster on multi-processor machines.

 

If the CPU only has a single core, the results may be different (but that is a point that will quickly fall into obscurity).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 6
(3,422 Views)

Ben wrote:

Provided there are resource contentions and the parallel function play nice together, a bunch of parallel paths will almost always run faster on multi-processor machines.

 

If the CPU only has a single core, the results may be different (but that is a point that will quickly fall into obscurity).


Therein lies the crux. The technically correct answer to the question is: faster/more efficient under what conditions? Would the same hold for a single processor with hyperthreading? That's why I never too much stock in absolutes. Smiley Wink

Message 6 of 6
(3,410 Views)