vc++: differences in runtimes of release build

2019-08-06 11:45发布

when I build my project in release mode, right click the project and say debug > start new instance, this takes about 49 seconds to run(its a large task) when i go to the release folder in the project folder and click the .exe it takes 130 seconds. when I move the exe to a folder with all the dependent dll's it takes 220 seconds.

Why is this happening? Why the significant difference in execution times?

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-08-06 12:33

This is suspect to me, because when you run code in the debugger, it enables extra debugging hooks which in my experience result in SLOWER execution when run inside the IDE than outside. I never run Release Build performance tests within Visual Studio for this reason.

Are you sure that when you run outside the IDE you are not mistakenly picking up Debug versions of all or part of your dependent binaries?

查看更多
登录 后发表回答