|
Boost Users : |
Subject: Re: [Boost-users] performance tuning on boost version 1_64_0
From: Mark Stallard (stallard_at_[hidden])
Date: 2017-07-05 17:11:51
Connie Zhang wrote:
> I recently upgrade boost version of a visual C++ program from an old version of 1_58_0 to 1_64_0.
> Compared to the original executable, the newly upgraded one runs very slow (more than 6 times
> longer) even I disable the debug mode and set the optimization to /ox in visual environment.
>
> The other difference between the old and the upgrade ones is the visual studio version. The old
> one is on 2010 and the new one 2013.
This problem sounds like one I had last year when upgrading a vendor library and from Visual Studio
2010 to 2012. I had persistent linker errors like this:
error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match
value 'MTd_StaticDebug'
I was surprised (and actually angry) when I learned the cause: The Visual C++ 2012 compiler silently
changes option /MT to /MTd if the preprocessor macro DEBUG or _DEBUG is set using /D. Some
vendor libraries I needed were compiled only with /MT, so the link would always fail. It made no
sense to me that a preprocessor macro definition should force a compiler option change like that.
You did say that you disabled debugging, butâ¦
Are you defining either DEBUG or _DEBUG in the compiler command line? Try removing it if you do.
If you use â#ifdef DEBUGâ in your code, consider adding your own text to the macro name, such as
âMY_PROJECT_DEBUGâ. You can still debug your code without using /MTd by adding option /Zi or
something similar to the compiler and linker commands.
I hope this helps.
|+| M a r k |+|
Mark Stallard
Engineering & Operations Application Development
Business Application Services
Global Business Services Information Technology
stallard_at_[hidden]<mailto:stallard_at_[hidden]>
Raytheon Company
880 Technology Park Drive
Billerica, MA 01821
www.raytheon.com<http://www.raytheon.com/>
This message contains information that may be confidential and privileged. Unless you are the addressee (or authorized to receive mail for the addressee), you should not use, copy or disclose to anyone this message or any information contained in this message. If you have received this message in error, please so advise the sender by reply e-mail and delete this message. Thank you for your cooperation.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net