Coffeehouse Post

Single Post Permalink

View Thread: Are Virtual Function Calls Still Expensive?
  • User profile image

    DigitalDud wrote:
    prencher wrote:
    In many ways it's similar with C# / C++.. For a lot of stuff C# can be faster, simply because it takes a lot of effort to make the C++ faster (See RicoM and Raymonds blog series where raymond did a C app and Rico did a C# one).

    Yeah and Raymond ended up winning, no?  In my experience, the .NET JIT compiler does not optimize nearly as aggressively as does C compilers, like VC++.  It's limited by its requirement that it perform compilation in a very short amount of time. 

    Also with startup (especially cold) and memory footprint, C# will really lose here.

    Yes, he did win. But he expended a whole lot more time and expertise to get it faster than Rico's basic C# application. That was the point of my post; If you're not an expert in the area, you will likely be able to get to your performance goals a lot easier and faster with e.g. XNA.

    Everything has it's place, obviously, and I'm a C++ buff myself, but you don't get significantly better perf "by default" by using C++, not by a long shot.

    In the case of games, at least the non-"AAA" titles, XNA is in many cases very fitting because the bulk of the performance depends on the graphics, and there XNA is very close to native.