Boost logo

Boost :

Subject: Re: [boost] [parameter] Compile-time performance
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-02-26 14:30:37


At Sat, 26 Feb 2011 19:07:37 +0100,
Domagoj Saric wrote:
>
>
> "Dave Abrahams" <dave_at_[hidden]> wrote in message
> news:m262s6r9pi.wl%dave_at_boostpro.com...
> > I think you don't understand how MPL maps work and you missed the
> > mechanism in Boost.Parameter. Therefore, I think you don't understand
> > the source of the slowdown.
>
> It might well be so...but...the slowdown almost disappeared when I replaced
> argument packs with mpl::maps...and the only thing that I know of that went
> with along with that change is the type requirements checking...so it's
> either arg-pack lookup or the requirement checking...

Likely the latter, but it could still be something else. Template
compilation speed is still something of a black art.

> > We gave that approach serious consideration and would of course have
> > preferred to do it that way. I don't recall the reasons we decided
> > against it.
>
> That's what comments are for :P

Thanks, dad.

> Perhaps it was exactly compile time performance (i.e. you wanted more
> descriptive names, e.g. template_keyword instead of mpl::pair, and that
> would require wrapping mpl types which incurs additional
> instantiations...)...

Probably.

> >> Well, the first step I guess would be to disable type requirement
> >> validation
> >> and measure the difference...
> >>
> >>
> >> ps. have you used SW's template profiler (with B.P.) ?
> >
> > Not yet.
>
> Well if you are really into trying to improve Boost.Parameter the two
> obvious things to try is the elimination of the requirement checks and SW's
> template profiler...I am willing to help however I will not be by my work
> computer for the next 10 days...

I won't have time to get near that code in the next 10 days, so I can
wait :-)

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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