App. performance degrade 2003 -> 2005

After converting my project from VC++ 2003 to 2005 Express and rebuilding in release mode, I've found that my application's performance has dropped by about 25%.

I reviewed all of the project's optimization settings to make sure that nothing got set wrong during the project conversion.

I reviewed the documentation for optimization settings differences between VC++ 2003 and 2005, and made sure that I am using appropriate settings for speed optimization.

Are there any documents available which might guide me in tracking down what went wrong with my project conversion Any hints or suggestions at all would be welcome. I'm at a complete loss.

For what it's worth, my application is a parser. The lexer part is hand-coded C++, the parser part is generated by Antlr 2.7.5.

Cheers
John at Joanju dot com



Answer this question

App. performance degrade 2003 -> 2005

  • doroshjt

    I'd hunt down the source of this crash if I were you. You don't get crashes unless there is some bug in yours, Sun's or Microsoft's code.

    If it was caused in your parser, that could be a cause of your slowdowns. Even if it isn't the cause of the slowdown, at least you will have eliminated one "variable" that could have caused it.



  • Yougewenti

    Please feel free to log the issue at http://lab.msdn.microsoft.com/productfeedback/default.aspx where the owners would take a look.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Amish Bandekar

    Thanks OShah. I did see that thread, and I've been following it, along with a couple of others. I've also subscribed via RSS to all three C++ forums.

    After my own experiences described in previous messages, and after reading other people's experiences and speculations about what might be causing the new compiler to make their applications slower, I've switched back to 2003 for now.

    I hope that these performance issues will be resolved in future patches or updates. I'm not willing to give up 25% performance in my applications, but at the same time, I don't want to fall behind in compiler versions. I'll switch to another compiler vendor if I have to.


  • Patrick.E

    Thanks. If I manage to distill the performance regression down to something that can be easily or reasonably reproduced by your team, I will do that.

  • Tony Harris

    There was a recent thread (http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=253978&SiteID=1) in the VC language forum that mentioned multithread locks might also be the source of the problem. You may want to investigate that too...

  • Lejing

    One of the links presented in that search is this page: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=97258&SiteID=1.

    Take a look at the answer to that thread and see if it helps.



  • MINA

    It's probably a guess, but I bet your code uses a lot of STL. Please take a look at http://forums.microsoft.com/MSDN/Search/Search.aspx words=stl%20performance&localechoice=9&SiteID=1&searchscope=allforums.



  • confusedDeveloper

    Thanks for the reply OShah. I haven't resolved my issue yet, but that looks like it might be a useful avenue to explore. I do indeed use a lot of STL in my code.

  • Tyler Clendenin

    One of the threads suggested turning off the STL run time safety checks with:
    /D_SECURE_SCL=0

    I did that, and my application only runs marginally faster - still 20% slower than compiled with VC++ 2003.

    Not only that, but now I get an application error. My application is a DLL, and my timer test is a Java application that loads the DLL. The error (at the end of the run, probably when Java is unloading) is:
    java.exe - Application Error
    The instruction ... referenced memory at "0x00000045". The memory could not be "read".

    My "timer test" is a few years old. I run this same test on multiple platforms using multiple compilers. I've never seen this particular error before.

    So, I'm turning off that flag, and back to the drawing board. :(


  • App. performance degrade 2003 -> 2005