I've just upgraded a native C++ project from VS2005-SP1 to VS2008-SP1
The first thing I tested was a very basic functionality test of the application and the first thing I noticed is that the main number-crunching algorithm performs three times slower in the VS2008 binary.
I tested again the VS2005 binary to make sure there isn't any other difference and it still performed as it did before.
Did anyone stumble into this?
Asked
Active
Viewed 819 times
7

Kent Fredric
- 56,416
- 14
- 107
- 150

shoosh
- 76,898
- 55
- 205
- 325
-
Are you running optimized or debug? – David Norman Dec 12 '08 at 02:59
-
running release ofcourse – shoosh Dec 12 '08 at 03:10
-
Did you accidentally compile with different options? For example, did you compile for 64-bit Windows rather than 32-bit Windows? – Kevin Dec 12 '08 at 03:15
1 Answers
19
Strangest. Thing. Ever.
It seems that the project upgrade wizard of vs2008 simply doesn't copy the 'Optimization="2"
' property so the new project is left with no optimization in release.
The fix was to go to the properties dialog, change optimization to 1 and then back to 2. compile again and everything works it should.
I couldn't find any official reference for this only this obscure reference in an MSDN forum.

shoosh
- 76,898
- 55
- 205
- 325
-
It's nice to know the optimizer is kicking that much butt, at least. – Drew Hoskins May 07 '09 at 00:20