Speed and C#

Started by
11 comments, last by GameDev.net 18 years, 8 months ago
When it comes to floating-point performance, C++ is still significantly faster than C#. When it comes to typical application-level control flow, C# is on par.

When you say that something "is as fast" but "uses more memory" then that's curious -- typically, the more memory an application touches, the slower it will be. Making things smaller (and thus fitting better in cache) almost always speeds up an application.
enum Bool { True, False, FileNotFound };
Advertisement
I'm not the same AP above, but he is correct. It always depends on memory and/or the machine it's running on. If you put a C++ program on an old computer, what will you expect? In my opinion, I'd say it'll run slower. So with today's faster computers, Java will continue to grow faster. Still, so does C++ programs.
Java is compiled to bytecode, which is run-time optimised and compiled to binary. This technology is called HotSpot, and there are several advantages to be had here over C++. Devirtualisation of functions at runtime, for instance. This gives Java the capability to actually outperform C++ (whether this is meaningful in practice is debatable, however.)

But this is not really the point. Java may be slower than C++, but it certainly isn't slow. The same is true of C#. I'll reiterate:
Quote:
As a game developer you should be concerned with what gets the job done best- not what gets the job done eventually with a few more measly frames per second.

This topic is closed to new replies.

Advertisement