Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2005-12-15 04:42:14


> Thanks for checking. FYI, _SECURE_SCL, which is 1 by default, turns
> on the "secure" version of the C/C++ libraries. This version, among
> other things, includes extra checks in some functions. MSFT claims
> these checks should not slow down functions but I wanted to know if
> somebody had noticed a slowdown in boost libraries compiled with this
> option.
>
> As far as _HAS_ITERATOR_DEBUGGING, which is also 1 by default, turns
> on some extra checks inside STL _in debug mode only_. These checks
> are pretty heavy, to the point of changing the complexity of STL
> algorithms. For example, std::lower_bound(it_begin, it_end, val,
> pred) will execute pred(it_current, val) when appropriate. If
> _HAS_ITERATOR_DEBUGGING is 1, MSFT calls pred _twice_, once like
> pred(it_current, val) and once like (val, it_current). This, besides
> slowing down lower_bound, prohibits the use of a predicate that takes
> different argument types.

At least for one regex test program, it's 2 or 3 times slower with all the
checks turned on (or subjectively appears to be anyway). This is a very
heavy standard-library-thrashing test case though :-)

John.


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