Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Jul 6, 2011


Feedback


Yes No

Related Links - Developer Zone

Related Links - Products and Services

Benchmark Utility for LabVIEW and C++

0 ratings | 0.00 out of 5
Print | PDF

Overview

Benchmarking software is a delicate and time-consuming task for developers, but for high-performance applications, it can be important to know how implementation impacts execution performance. Ultimately, execution speed is largely a result of the implementation, coding style, and relies heavily upon the developer to use the techniques that are best suited for the language. Of course, the biggest factor is the hardware that the software is run on, and the state of the software on the machine (how many other applications are open, are virus scans running, etc...).

This utility is provided to help developers create and run benchmarks, and provide comparisons with other languages.

Benchmarking Framework

This benchmark framework is designed to make it easy to compare the performance of multiple implementations of the same algorithm. This application has been built into an executable and includes a source distribution for a set of benchmarks that compare LabVIEW with functionally equivalent algorithms written in C++.


[+] Enlarge Image

Installing the Benchmarks

  1. Download and install the LabVIEW 2009 Run-Time Engine x86 (Windows XP/Vista/7)
  2. Download and install the Benchmark Utility Installer v0.9 (Windows XP/Vista/7)
  3. If you are running Vista or Windows 7, make sure you launch the benchmark executable as an Administrator.  Right-click and select 'Run as Administrator.'

Running the Benchmarks

To run these benchmarks, download and run the installer as described above. In addition to the executable, the installer includes the VIs that are actually loaded and run for these tests.

  1. The framework scans the set folder location for benchmarks at startup and displays them in the top left dialog
  2. You can select one or multiple benchmarks to be run by holding CTRL
  3. The graph will show the results of the benchmarks that are highlighted. If none have been run, it will be blank. You can toggle between 'Total Time' and 'Average Time' for more intuitive comparisons.
  4. Select a benchmark and click 'Configure' to change the number of iterations. This will be immediately stored to an XML file. The default for new benchmarks will be 10 times
  5. To display the source code, click 'Information' and select the actual code you wish to see. Output or information can optionally be displayed in this dialog.
  6. To test the performance of UI intensive code, be sure to select 'show FP'
    To save / export the results, select the algorithms to be stored, and select 'export results.' This will save the data to a TDMS file with properties that include system information. It will not overwrite existing results.

Description of Benchmarks

The following table provides information on the included benchmarks.  Note that some rely upon external dlls for C applications, which are noted below.

Benchmark LabVIEW C++ Executable Notes
FFT (Fast Fourier Transform) X X  
Binary File Read X X  
Binary File Write X X  
Image Processing Algorithm X X  
Matrix Multiplicaiton (Single Thread) X X  
Matrix Multiplication (Multithreaded) X X  
Savage X X  
Sieve X X  
Eigen Values X    
Parallel Loops X    
TDMS File Writing) X    

Understanding Timing

The benchmarks used in this framework eliminate errors introduced by starting and stopping timing for every iteration by timing all of the iterations when executed sequentially and then dividing the time by the number of iterations.


[+] Enlarge Image

 

Benchmark Template / Connector Pane

The template for benchmarks has also been attached below. Make sure that the connector pane appears as shown.

Adding Benchmarks or Modifying the Framework

If you want to add benchmarks to the installer for distribution, or modify the framework itself, you will need to download the source code, which has also been attached to this document. Please note that you will need the OpenG libraries, which are available through VIPM (VI Package Manager).

Related Links

 

 

Downloads

benchframework092a.zip

0 ratings | 0.00 out of 5
Print | PDF

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).