Jump to content
  • Advertisement
Sign in to follow this  
nihonlvr

[.net] Visual Basic .NET vs C#

This topic is 4555 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am pretty new to programming and know C/C++ and am currently learning Java. I have a friend who is interested in learning how to program games. He is currently learning Visual Basic in college. I was wondering if the speed of all .NET languages are the same. I am considering learning Visual Basic .NET in order to do a small project with him. Would Visual Basic have the speed enough to complete a MMORPG...j/k, a simple RPG? Any help would be great.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by nihonlvr
Would Visual Basic have the speed enough to complete a MMORPG...j/k, a simple RPG?

Yes.

Share this post


Link to post
Share on other sites
Quote:
Original post by nihonlvr
I was wondering if the speed of all .NET languages are the same.
C# and VB.NET are compiled into the same thing, so yes. It all comes down to personal choice.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I found that IL code, which .NET compilers create, is not optimal. It needs to do some optimization. And the speed of .Net applications is not so good with compare of unmanaged code i think.

Share this post


Link to post
Share on other sites
Quote:
Original post by Rob Loach
Quote:
Original post by nihonlvr
I was wondering if the speed of all .NET languages are the same.
C# and VB.NET are compiled into the same thing, so yes. It all comes down to personal choice.


You know, I hear that a lot, and it doesn't really make any sense. C and VB4 also compiled to the same thing. I don't think anyone maintained any illusions. That said, VB.NET and C# have comparable ideologies and features, and the compn fact, in the original version of VS7, VB.NET was somewhat slower than C# because the C# compiler did a better job. Now that they have matured, the differences should be negligible. On the top of my head:

- C# is less verbose than VB.
- VB's intellisense is somewhat better.
- C# has a much better delegates syntax.
- C# is scheduled for interesting novelties in the next standard. Not sure about VB.
- VB has optional parameters and With blocks.
- C# has operator overloading.

Quote:
Original post by nihonlvr
Is it possible that .NET managed code will run a lot faster under Vista?


The word's on the street, altough I wouldn't expect any drastic change. But seriously, .NET languages are fast enough. Right now.

Share this post


Link to post
Share on other sites
Quote:
Original post by nihonlvr
Is it possible that .NET managed code will run a lot faster under Vista?


I wouldn't say 'a lot' but you can bet it will run faster. Maybe 10%, maybe not.
At the end of the day the speed of your app comes down to algorithm and memory managment choice (eg, sorting ,cache/GC usage, etc). If it's C++ or C# you likly will not see a difference. I've had apps I've ported from C++ to C# end up faster in C#, and also the odd one end up slower. In the grand scheme of things does 5% matter? No. I don't think it does.

There has been talk of intels next set of CPUs having instructions tailored to at least compiling .net code... Not so sure about actually running it. Which brings up a point to consider:
When we all finally do shift away from x86 architecture, your .net app will still run efficiently while your native C++ app may simply not run at all, or will require recompile/porting/emulation.

Quote:

I found that IL code, which .NET compilers create, is not optimal. It needs to do some optimization. And the speed of .Net applications is not so good with compare of unmanaged code i think.


*sigh*



ohh, yeah.

Good luck with your MMORPG :-) that made me smile it did

Share this post


Link to post
Share on other sites
Quote:
Original post by jfclavette
You know, I hear that a lot, and it doesn't really make any sense. C and VB4 also compiled to the same thing. I don't think anyone maintained any illusions. That said, VB.NET and C# have comparable ideologies and features, and the compn fact, in the original version of VS7, VB.NET was somewhat slower than C# because the C# compiler did a better job. Now that they have matured, the differences should be negligible. On the top of my head:

.....
Despite all of these differences, C# and VB.NET are both compiled into the same IL assembly, as the Anonymous Poster said.

One incorrect thing the AP said was that the speed of .NET applications was a lot slower when compared to unmanaged applications. If you take a look at this performance comparision between C++, C# and Java, you'll notice that C# is actually much faster in some instances. Even when it is slower, the difference is very minor.

Share this post


Link to post
Share on other sites
Quote:
Original post by jfclavette
You know, I hear that a lot, and it doesn't really make any sense. C and VB4 also compiled to the same thing. I don't think anyone maintained any illusions.

No, they didn't. VB4 compiled to p-code, not native code.

Share this post


Link to post
Share on other sites
As far as speed goes, JIT compiled code is extremely fast, not enough to care about. The speed hits come in when you're dealing with things like transitions from managed to unmanaged and back, marshalling, (maybe) mixed mode assemblies, and stuff like that. A lot of those problems will be sorted out with WinFX, but that's a while away.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!