From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-02-2007 06:35 AM
05-02-2007 06:57 AM
Benchmarking languages is not easy to do since the speed of execution is most determined by the program efficiency. Compiler and code optimization play a huge role in the results. As for raw speed c/c++ will probably give the fastest results but I would guess that the difference in speed is less than a factor of 2x. The real payoff in labview is the rapid development. I would trade a 2x execution speed for a 10x development speed anyday. What are you trying to do? I have done some serious processing with labview without any issues since the PC has become so fast. Also remember that dlls are often called behind the seen many of which were written in c/c++ anyway so you wont loose anything there.
Paul
05-02-2007 07:53 AM
05-02-2007 08:07 AM
As an former C programmer and machine language programmer I can tell you that I could always write faster code code in machine language than in C.
When a mainframe cost $3M and only had 2Meg memory and topped out at 1MHz, it made sense to spend extra human time making use of the limited machine resources.
We used to play games like "I can write that code in 15 lines..."
So with the exception of the most demanding applications, the difference in code performance only shows up in one version using 25% CPU whle the other takes 30%.
Ben
05-02-2007 10:12 AM
Yes this is similar to the c vs assembly on performance. When was the last time you broke out the assembler. The fact is that compilers got so good at optimization that you had to be very good to out perform it using assembly, but at a great cost of development time. I would be curious to see how the two languages do compare but I am not going to switch back to c.
Paul