Sign in to follow this  
Kryptus

.NET Language Differences

Recommended Posts

I have programmed a lot with C++ 6.0 and VB 6.0 and knew that VB 6.0 was limited and ran a lot slower than C++ 6.0. What I want to know is, with C++ .NET and VB .NET, does VB .NET run slower than C++ .NET?

Share this post


Link to post
Share on other sites
Just for the record, why VB will always be slower? Take an example of VB's array. Everytime you access that array VB checks for you whether you are within the array boundaries. Whereas C/C++ doesn't care. So the VB checks it everytime, so it has to be slower. If i'm 100% sure, that i will never ever try to acces an array element outside its boudaries, there's no need to check it every time...

Well, thats an oversimplified example of why the C would ever roun faster :)
Hope it explains a little :)
Y.

Share this post


Link to post
Share on other sites
C++ .Net (that is managed C++) should have pretty much identical performance to VB .Net as they both compile down to MSIL (which is JIT compiled into native code when the program is run) and will both use the .Net class library.

If you're talking about unmanaged C++ then it will run faster than VB.Net however the speed difference will be slight and could be unoticible depending on what you're doing.

Share this post


Link to post
Share on other sites
Quote:
Original post by Monder
C++ .Net (that is managed C++) should have pretty much identical performance to VB .Net as they both compile down to MSIL (which is JIT compiled into native code when the program is run) and will both use the .Net class library.
Will similar code in the two languages compile into the same bytecode? VB 6 and C++ are both compiled down to [whatever platform] instructions.

Share this post


Link to post
Share on other sites
Once you are committed to using non-portable bytecode you might as well use C#, VB.NET unless you need to use a LOT of interop code. I've been using C++ for ten years, and if I had to use .NET I would just go ahead and use VB or C# before C++ just because the development seems to go so much faster in C# than C++. As far as speed, perhaps C++ is a bit faster than VB even for the bytecode, but why pay twice the cost of programmer hours for a *possible* 10% gain in speed.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this