Analyzing Performance (Multicore Analysis and Sparse Matrix Toolkit) (Windows)
- Updated2023-02-21
- 3 minute(s) read
The LabVIEW Multicore Analysis and Sparse Matrix Toolkit provides single-threading and multithreading support and single- and double-precision data type support. Support for these features can impact the performance of your application. Analyzing the performance of an application that uses the Multicore Analysis and Sparse Matrix Toolkit can help you take advantage of these features.
Multithreading Support
LabVIEW enables multicore programming, or multiprocessing, which allows each processor in one computer to run a separate thread simultaneously. Because LabVIEW is a dataflow programming language and can automatically multithread programs, LabVIEW is ideal for overcoming multicore programming challenges.
In some computationally intensive applications, such as multi-channel signal processing, image processing, and high loop rate control and simulation, computing a single analysis function, such as matrix-matrix multiplication or the fast Fourier transform (FFT), can be very time-consuming and impede the performance of the entire application. The Multicore Analysis and Sparse Matrix VIs are extensively parallelized to use multiple processors more efficiently. This can significantly improve performance of the entire application on multicore systems.
The following figures illustrate the computation time and performance of the A x B VI in the Multicore Analysis and Sparse Matrix Toolkit. Both figures compare a different number of threads on a quad-core system running a Windows operating system.

In the previous figure, the A x B VI leverages the number of threads available to compute the product of two matrices. When more threads are available, the A x B VI computes the product more quickly.

In the previous figure, multiple threads perform more efficiently when compared to a single thread. In fact, the larger the matrix size, the greater the performance improvement of multiple threads over a single thread.
Single-Precision Data Type Support
The Multicore Analysis and Sparse Matrix VIs support single- and double-precision floating-point numbers. The Signal Processing VIs and Mathematics VIs support double-precision floating-point numbers only. Use of single- or double-precision floating point numbers can vary the computation time and performance of applications as the following figures illustrate. These figures compute the product of two matrices using the A x B VI in the Multicore Analysis and Sparse Matrix Toolkit.

In the previous figure, using the single-precision floating-point instance of the A x B VI computes the product of two matrices faster than the double-precision instance.

In the previous figure, the performance improvement of the single-precision floating-point instance of the A x B VI over the double-precision instance is about 2. In general, using single-precision floating-point numbers can achieve better performance and take up less memory than double-precision floating-point numbers.
![]() |
Note Compared with double-precision data types, loss of precision might occur when using single-precision data types. Therefore, use single-precision data types when performance improvement and memory savings are important and you will not overflow the range of the numbers. |
