Jump to content

Labview vs C++ performance


Recommended Posts

Hello,

At first.. sorry for my bad english, i´ll do my best.

I am doing a little research about "Labview performance compared to C++" and my goal is to test that how well Labview suits for embedded design where performance is important thing.

I have Labview 8.5 and Embedded Module for Blackfin. Blackfin board is BF537. NI claims that Labview performance is as fast as C, but i´m not so sure about that. I have seen graphs of labview performance somewhere, but now i can´t find those anywhere :( Anyone have those graphs?

Testing goes as follows: I run example programs (which came with the package) on VisualDSP++ 5.0 and count the number of cycles. After that i run the same program on labview and use profiling tool to count the time. I have been working with Audio Talkthrough code and it seems that Labview is many times slower. I have also programmed a very simple math program which calculates multiplication of floats and again labview seems to be slower. After that I have a number of questions in my mind.

How can i be sure that those example programs are exactly the same (Talkthrough example)? Is it same to calculate cycles and divide it by CLK frequency (600 MHz in BF537 (example: 10000 cycles/600 000 000) and use profiling tool? Has anyone tested this already? I have found only this forum post: http://forums.lavag.org/Execution-speed-in...view-t3291.html

Can anyone help me, please? I would really appreciate it!

Link to comment

Hi,

I will be in the same situation you are as soon as my hardware arrives but I can already tell you that the LabVIEW Profile VI tool is definitely not to be used for comparison between LV and VDSP++. The reason being is that the LabVIEW profile tool slows down the actual execution due to all the hooks it places into the code to do the profiling. It is very useful to figure out which of your SubVIs you spend the most time in but it is not useful for benchmarks.

I quick look at the BlackFin palette showed me a VI called BF RTC Get DateTime which retrieves the current time from the BlackFin RTC. My first idea would be to put that before and after the code you are running, then subtracting one from the other to give you execution time. This should give you a clearer idea of the execution with LabVIEW.

However, you have to remember that when you are running the code from LabVIEW with frontpanel open, you are runnin in a debug mode that will be inherently slower than the VDSP code running on the device with just a terminal window open. How exactly you would make the LV code runn on the blackfin without debug mode and retrieve the timing, that I do not know yet. If you find out, please post it here :yes:

Good Luck,

Heiko

Link to comment

QUOTE (hfettig @ Oct 6 2008, 10:08 AM)

I quick look at the BlackFin palette showed me a VI called BF RTC Get DateTime which retrieves the current time from the BlackFin RTC. My first idea would be to put that before and after the code you are running, then subtracting one from the other to give you execution time. This should give you a clearer idea of the execution with LabVIEW.

We've used the RTC VIs and they're not very quick. You'll have to do some testing to decide if the resolution is good enough for profiling.

Derek

Link to comment

QUOTE (hfettig @ Oct 6 2008, 03:08 PM)

Hi,

I will be in the same situation you are as soon as my hardware arrives but I can already tell you that the LabVIEW Profile VI tool is definitely not to be used for comparison between LV and VDSP++. The reason being is that the LabVIEW profile tool slows down the actual execution due to all the hooks it places into the code to do the profiling. It is very useful to figure out which of your SubVIs you spend the most time in but it is not useful for benchmarks.

I quick look at the BlackFin palette showed me a VI called BF RTC Get DateTime which retrieves the current time from the BlackFin RTC. My first idea would be to put that before and after the code you are running, then subtracting one from the other to give you execution time. This should give you a clearer idea of the execution with LabVIEW.

However, you have to remember that when you are running the code from LabVIEW with frontpanel open, you are runnin in a debug mode that will be inherently slower than the VDSP code running on the device with just a terminal window open. How exactly you would make the LV code runn on the blackfin without debug mode and retrieve the timing, that I do not know yet. If you find out, please post it here :yes:

Good Luck,

Heiko

Thanks for the answer!

That´s what i was afraid of. So.. back to work, i´ll try to find solution for that!

Link to comment
  • 2 weeks later...

If your hardware has a digital output and you have an oscilloscope, or logic analyzer, you can measure the time it takes for different parts of your code to execute. You turn the digital output ON at the start of the block of code you want to measure and OFF at the end of it. Setup the digital output ON/OFF in the equivalent code segments you want to compare in LabVIEW and VDSP++, and then measure the real time it takes to run.

Good luck,

Lee

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.