VC++ differences between debug/release

Hi Folks

So my new game is nearly finished. Great. I build it in Release mode, and some areas of the game run MUCH slower than when it’s running under Debug mode.
I’ve checked all the settings and they’re identical to Debug mode, except of course for the generation of debug information.

Turning that on/off makes no difference.

So I am very confused. Does anyone else know why this could be happening?

Thanks
Ed

Hello! Great to hear about your new game! Finishing a project is always a hard thing to do as the natural tendency is to scrap it and re-write it :wink:

As for it running a lot slower, there are a couple possibilities. The adding of the debugging information shouldn’t in itself slow it down much. It bloats the executable, but shouldn’t do much more than that.

However, one of the bigger differences between debug and release is that release will use optimizations. The optimizations are code rearranging, loop unrolling, MMX/SSE optimizations, and other things I can’t think of right off hand.

Also, depending on your setup, you might be linking to a debug version of SDL rather than the release version. That will also have an impact on performance as it is missing out on similar optimizations.

It might not be a bad idea to do a little digging and try to find out how much of a slow down, and what part of the code might be triggering it.
Seems like there is profiling software you could use for that, but I’ve never used any myself.> Hi Folks

So my new game is nearly finished. Great. I build it in Release mode, and some areas of the game run MUCH slower than when it’s running under Debug mode.
I’ve checked all the settings and they’re identical to Debug mode, except of course for the generation of debug information.

Turning that on/off makes no difference.

So I am very confused. Does anyone else know why this could be happening?

Thanks
Ed