Subject: Re: [boost] [local] Help for the Alternatives section
From: Vicente BOTET (vicente.botet_at_[hidden])
Date: 2011-04-03 15:44:04


> Message du 03/04/11 19:49
> De : "Lorenzo Caminiti"
> A : boost_at_[hidden]
> Copie à :
> Objet : Re: [boost] [local] Help for the Alternatives section
>
> On Sun, Apr 3, 2011 at 1:23 PM, Lorenzo Caminiti wrote:
> > I have done an (hopefully more correct) benchmark of Boost.Local
> > performances compared with the alternative methods -- please check my
> > doing :)
> >
> > In summary:
> > 1) Boost.Phoenix, global functors, and local functors run in ~15s.
> > 2) Boost.Lambda runs in ~40s.
> > 3) Boost.Local runs in ~53s.
> > 4) I don't have a C++0x lambda compiler so I could not benchmark C++0x lambdas.

With these timings it seems to me that you will be forced to provide two macro families: one that doesn't use the trick and can be used as template parameter only on compilers supporting this C++0x feature and the other which uses the trick is slow but can be used in a portable way as a template parameter.

I guess that this benchmark shows a hard limitation of Boost.Local at least until most of the compilers will accept local structures as template parameters.

Best,
Vicente