Let's assume that C++ is on average 50% faster than C#. A typical game might spend 50% of its time in OpenGL drivers, 25% in physics, 5% in OpenAL, 5% in networking, 10% in scripting (AI, game code) and 5% in other CPU tasks (frame setup, input handling, timing etc).
Using C++ would grant me a 2.5% speed advantage in CPU tasks and maybe another 2.5% due to interop overhead. The rest of the tasks are not affected by the choice of language.
5% better framerate in C++? Big effing deal. You can get that 5% back by spending a couple of days tweaking your OpenGL shaders in the C# version. A couple of days? Yes, that's the aggregate compilation times for the C++ version.
As I said, applications are not created in a void. Language performance is meaningless on its own in everything but purely math code. Every other task will have to rely on OS components, middleware libraries and tons of other modules with their own performance characteristics. Does it matter that Python is 50% slower than C, when all the program is doing is copying files on disk, manipulating XML, executing SQL queries or waiting the OS to finish redrawing the window?



Reply With Quote