Boost logo

Boost :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-02-24 01:15:10


"David Abrahams" <dave_at_[hidden]> wrote in message

> "Arkadiy Vertleyb" <vertleyb_at_[hidden]> 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.

Regards,
Arkadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk