LoomVortex Posted October 7, 2008 Report Share Posted October 7, 2008 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! Quote Link to comment
hfettig Posted October 7, 2008 Report Share Posted October 7, 2008 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 Good Luck, Heiko Quote Link to comment
DerekLV Posted October 8, 2008 Report Share Posted October 8, 2008 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 Quote Link to comment
LoomVortex Posted October 9, 2008 Author Report Share Posted October 9, 2008 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 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! Quote Link to comment
lwatson Posted October 17, 2008 Report Share Posted October 17, 2008 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.