Visit our LabVIEW Wiki LabVIEW Embedded Portal
Tags |
(This content has not been tagged yet)
|
![]() |
Oct 6 2008, 11:28 AM
Post
#1
|
|||
![]() I've come back for more. Member Posts: 2 Joined: 25-August 08 From: Finland Member No.: 12362 Using LabVIEW Since:2005 LV:8.5 ,. ,.
|
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 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!
|
||
|
|
|||
| Ad |
Oct 6 2008, 11:28 AM
Post
#
|
||
|
|
|
||
|
|
|||
Oct 6 2008, 02:08 PM
Post
#2
|
|||
![]() Very Active Premium Member ![]() Posts: 90 Joined: 12-November 04 From: Gatineau, Quebec, Canada Member No.: 1022 Using LabVIEW Since:2001 LV:8.6 ,8.5.1 ,.
|
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 LabVIEW 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 LabVIEW 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 Good Luck, Heiko
|
||
|
|
|||
Oct 7 2008, 02:33 PM
Post
#3
|
|||
|
Enough LAVA to be dangerous Member Posts: 4 Joined: 28-November 05 Member No.: 3572 LV:8.0
|
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
|
||
|
|
|||
Oct 8 2008, 09:04 AM
Post
#4
|
|||
![]() I've come back for more. Member Posts: 2 Joined: 25-August 08 From: Finland Member No.: 12362 Using LabVIEW Since:2005 LV:8.5 ,. ,.
|
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 LabVIEW 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 LabVIEW 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 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!
|
||
|
|
|||
Oct 16 2008, 09:28 PM
Post
#5
|
|||
|
One hit wonder! Member Posts: 1 Joined: 14-October 08 Member No.: 13476 Using LabVIEW Since:1993 LV:8.6 ,8.5 ,.
|
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
|
||
|
|
|||
![]() ![]() |
| Time is now: 1st December 2008 - 09:43 PM |