.NET Language Differences

Started by
4 comments, last by pTymN 18 years, 10 months ago
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?
Advertisement
Sure it does :)
VB is still higher level programing language than C/C++, no matter what platform it runs at :)
Y.
You were born an ORIGINAL don't die a COPY...ASCENT SYSTEMS
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.
You were born an ORIGINAL don't die a COPY...ASCENT SYSTEMS
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.
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.
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.

This topic is closed to new replies.

Advertisement