C# Debug/Release and Performance
I’ve been listening to this webcast today:
GDC 2008: Understanding XNA Framework Performance
I learned an interesting little fact:
“Debug vs Release setting in the IDE when you compile your code in Visual Studio makes almost no difference to performance… the generated code is almost the same. The C# compiler doesn’t really do any optimisation. The C# compiler just spits out IL… and at the runtime it’s the JITer that does all the optimisation. The JITer does have a Debug/Release mode and that makes a huge difference to performance. But that doesn’t key off whether you run the Debug or Release configuration of your project, that keys off whether a debugger is attached.”
Incidentally RoeCode’s XNA game engine series is now at part 18 and is looking pretty nice. I’ve totally slacked off of looking at XNA but I’m totally going to start playing with this again now.