Making Debug run faster.
#3
I'd say the debyg crt is your main problem, especially if your app is multithreaded. I think you can actually use release crt with a debug build, but basically you'll be losing all kinds of debugging measures implemented in the debug crt, not only memory debugging, but also (off my memory) iterator-to-container checks, function calling conventions checks.
If you're sure you want to do this anyway, toggle your project's Runtime Library option on the "C/C++ -> Code Generation" page in the Project properties dialog. I suggest You first create a new configuration for this and leave your Debug cofiguration unchanged, in case you still need it or if something goes wrong.

Still, such a difference in performance usually means you're not using stuff the right way. Such as using the wrong kind of containers for your algorithms.
For a recent example, see MCS rev 368 - the conversion was initially using std::string and pushing data into it byte by byte. Reserving the memory beforehand didn't help much, but using a plain old fixed-size buffer did the job - simply because pushing a byte to the string meant a whole swarm of various tests done by the debug CRT and then serializing access to the string via a critical section - try do that 100k times Smile
Reply
Thanks given by:


Messages In This Thread
Making Debug run faster. - by ThuGie - 03-06-2012, 10:28 PM
RE: Making Debug run faster. - by FakeTruth - 03-06-2012, 11:09 PM
RE: Making Debug run faster. - by xoft - 03-06-2012, 11:19 PM
RE: Making Debug run faster. - by ThuGie - 03-06-2012, 11:49 PM
RE: Making Debug run faster. - by xoft - 03-07-2012, 02:23 AM
RE: Making Debug run faster. - by FakeTruth - 03-07-2012, 06:19 AM
RE: Making Debug run faster. - by FakeTruth - 03-07-2012, 06:45 AM
RE: Making Debug run faster. - by FakeTruth - 03-07-2012, 06:47 AM
RE: Making Debug run faster. - by xoft - 03-07-2012, 05:17 PM
RE: Making Debug run faster. - by xoft - 03-08-2012, 11:44 PM
RE: Making Debug run faster. - by ThuGie - 03-14-2012, 08:18 AM
RE: Making Debug run faster. - by xoft - 03-14-2012, 06:10 PM
RE: Making Debug run faster. - by xoft - 03-15-2012, 05:40 PM
RE: Making Debug run faster. - by ThuGie - 03-15-2012, 06:49 PM
RE: Making Debug run faster. - by xoft - 03-15-2012, 11:57 PM
RE: Making Debug run faster. - by xoft - 03-16-2012, 05:12 AM
RE: Making Debug run faster. - by xoft - 03-16-2012, 06:03 PM



Users browsing this thread: 6 Guest(s)