Boost logo

Boost :

Subject: Re: [boost] [RFC] Boost library name mangling and Microsoft's 'secure STL' feature.
From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2008-09-04 15:25:37

Mat Marcus wrote:
> On Thu, Sep 4, 2008 at 10:26 AM, Peter Dimov <pdimov_at_[hidden]> wrote:
>>> Feature: <checked-iterators>
>>> 'on' --> _SECURE_SCL=1
>>> 'off' (default) --> _SECURE_SCL=0
>> I believe that the default should match the VC default, which is 1.
>> This has no performance implications.
> [snip]
> I wouldn't say that it has *no* performance implications. Default
> settings often have large impact since many people don't take the time
> to learn the meaning of the various settings or tune them. In my
> experience, this is especially true with a complex tool like boost
> build. I expect this would result in a large number of executables
> that are needlessly slow, as is the case today. Vendors are not
> infallible--I believe that Microsoft made a mistake in defaulting the
> flag to 'on' for release builds, and that most users just assume that
> they are not paying a release price for this "security". We have an
> opportunity to employ to follow conventional best-practices with boost
> build defaults, and I still lean in favor of doing so.
> Of course there are dangers. Mixing and matching a component built
> with the IDE defaults with a component built with (different) boost
> build defaults is a recipe for disaster. Then again, it is no great
> thing to ship a product with slow generic inner loops. In the end, I
> suppose that one could make the argument that one way or another users
> must be educated. Nonetheless, I think we should preserve the spirit
> of C++ by avoiding needless release performance tax on user-written
> generic algorithms.

For fun I took Steven Watanabe's recent filter iterator profiling app
from another thread and ran it in VC9 SP1 in both modes.

The app was posted here

9.297 seconds
5.812 seconds
8.75 seconds
4.688 seconds
2.922 seconds
3.016 seconds
Press any key to continue . . .

12.64 seconds
9.281 seconds
12.531 seconds
6.907 seconds
5.578 seconds
3.015 seconds
Press any key to continue . . .


Michael Marcin

Boost list run by bdawes at, gregod at, cpdaniel at, john at