Boost logo

Geometry :

Subject: [ggl] inline keyword in class definition
From: Hartmut Kaiser (hartmut.kaiser)
Date: 2009-05-11 09:28:39


Barend,

> Thanks and welcome to the list!
>
> > Does this slowdown happen in release mode?
> Yes
> > If yes, did you #define _SCL_SECURE=0 before including anything else?
> Yes
> > The STL for VC9 is known to be
> > slow in release mode if the 'secure' implementation is used (which
> > unfortunately is the default). You have to be very careful with this,
> > though, as it breaks ABI compatibility. That means you should use the
> same
> > settings for _SCL_SECURE for _all_ modules used in your application.
> > Otherwise strange errors will happen at runtime.
> >
>
> These are the defines:
> WIN32
> NDEBUG
> _CONSOLE
> NOMINMAX
> WIN32_LEAN_AND_MEAN
> _CRT_NONSTDC_NO_DEPRECATE
> _CRT_SECURE_NO_DEPRECATE
> _SCL_SECURE_NO_DEPRECATE
> _SECURE_SCL=0
> _HAS_ITERATOR_DEBUGGING=0
> BOOST_DISABLE_ASSERTS
> BOOST_ALL_NO_LIB
>
> So yes, it is all there. It might be a bit too much. The defines for
> 2005 are identical. They are defined in project properties so supposed
> to be always there.

In this case I don't understand why VC9 is slower. In my experience the
generated code isn't worse than code generated by VC8. We did some
measurements comparing those compilers as well. We saw a very similar
slowdown, but only as long as _SCL_SECURE was not defined. After setting it
to zero (i.e. disabling secure mode) the compilers have been on par. I'd
suggest to re-check the build setting for the performance measurements.

Regards Hartmut


Geometry list run by mateusz at loskot.net