Performance Considerations for Parallel For Loop Iterations

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

In some cases, enabling parallel iterations on a For Loop may not result in significant performance improvements. Use the following guidelines to optimize the performance benefits of a For Loop running with parallel iterations:

  • Enabling parallel loop iterations adds execution overhead. Do not enable parallel loop iterations on For Loops that are not computationally intensive. You can only improve performance if that overhead is countered by a decrease in execution time.
  • If you have a group of nested For Loops, enable parallel iterations on only the outer loop.
  • Blocking nodes, such as the Write to Text File function and non-reentrant subVI calls, can limit the parallelism between loop iterations. Avoid using blocking nodes in a For Loop running with parallel iterations.

Refer to the white paper at ni.com to learn more about improving performance with parallel loop iterations.

WAS THIS ARTICLE HELPFUL?

Not Helpful