Somebody let me know if VB.NET is less efficient or slower than C#. I have heard comments that VB.NET is same as VB.
I also heard that a component compiled in VB.NET is several times bigger than the same written and compiled on c#.
Printable View
Somebody let me know if VB.NET is less efficient or slower than C#. I have heard comments that VB.NET is same as VB.
I also heard that a component compiled in VB.NET is several times bigger than the same written and compiled on c#.
I don't think this is true...
the language compiles to the same thing.. only the syntax is different...
But you can always try for yourself of course... just write a small function in both languages, compile it and see the difference!
I decided to test that theory.. Wrote a cs app and a vb app that did the exact same thing..
They both compiles to the exact same size and when checking the il code, they were exactl identical except for where the vb exe had an instance set to the VB compiler services to define the entry point(The sub main)
but other than that, identical..No whether that instance setting to that compiler services thing will affect speed, I dsont know as with the small size of the test app, you cant see any speed differences..perhaps in a bigger project, but I dont think it will really matter all that much..
see this too
http://vbforums.com/showthread.php?threadid=169894
In C# there is an option to mark a block of code as Unsafe. Within that block they can access pointers; which can really speed up some types of processing. I don't think VB has this option.
:D
Hi all,
I am really indebted to you all for the useful information you have provided and for the time and effort you spent on this.
The benchmark info by MrPolite and the threads therein were very useful.
My special thanks to Cander.
With warm regards,
kalyan
A lot depends on what you really need C# for. You won't find many established applications written in C# simply because it hasn't been around. Most companies don't have the time or resources to rewrite a VB app in C# for any perceived improvements. The only exception I can see is if a company had a production ASP site and wanted to upgrade to .NET. They have no choice but to re-write in which case they could use VBdN or C#. Ultimately, I don't think it will really matter. With the current processor clock speed and cheap memory any performance increase from either language won't be noticeable if it exists at all.