Visual Studio 2008 awful performance
I have ported a piece of C++ code, that works out of core, from Linux(Ubuntu) to Windows(Vista) and I realized that it works about 50times slower on VS2008! I removed all the out of core parts and now I just have a piece of code that has nothing to do with the hard disk.
I set compiler parameters to O2 in Project Properties but still get about 10times slower than g++ in linux!
Does anybody have an idea why it is this muc开发者_Python百科h slower under VS?
I really appreciate any kind of hint!
Thanks,
Do you use a lot of the standard C++ library? If so, you might want to turn off the "checked iterators" feature that is on by default in Visual C++ (even in Release mode). Put this before including any standard headers:
#define _SECURE_SCL 0
More info here.
No need to guess. Just hit the "pause" button and look at the stack. The chance that you will miss the problem is 1/50. If you're not sure, do it several times.
精彩评论