
"Arkadiy Vertleyb" <vertleyb@hotmail.com> writes:
"David Abrahams" <dave@boost-consulting.com> wrote in message
"Arkadiy Vertleyb" <vertleyb@hotmail.com> writes:
Hi all,
I am having a huge compile performance problem trying to use mpl::begin for an mpl::vector of a large size -- the complexity seems to be far from constant (or even linear) time. The following example demonstrates it (I am using GCC 3.3.3 or 3.4.2)
Are you sure you're not seeing preprocessor slowness?
I modified the example to get the PP code out:
typedef BOOST_PP_CAT(boost::mpl::vector, BOOST_TYPEOF_LIMIT_SIZE)< BOOST_PP_ENUM(BOOST_TYPEOF_LIMIT_SIZE, MACRO, ~)
v;
#warning started getting begin typedef boost::mpl::begin<v>::type it; #warning done getting begin
It takes about 35 seconds between two warnings....
The similar problem seems to exist for at<>. It takes forever to compile at<v, int_<0> > in the same context.
Well, we need to hear from Aleksey on this one, I guess. -- Dave Abrahams Boost Consulting www.boost-consulting.com