Boost logo

Proto :

Subject: Re: [proto] The proper way to compose function returning expressions
From: Eric Niebler (eric_at_[hidden])
Date: 2012-04-26 12:38:15

On 4/26/2012 9:35 AM, Mathias Gaunard wrote:
> On 26/04/12 18:02, Eric Niebler wrote:
>> Interesting. I avoided this design because I was uncertain whether the
>> compiler would be able to optimize out all the copies of the
>> intermediate nodes. You're saying NT2 does it this way and doesn't
>> suffer performance problems? And you've hand-checked the generated code
>> and found it to be optimal? That would certainly change things.
> NT2 treats large amounts of data per expression, so construction time is
> not very important. It's the time to evaluate the tree in a given
> position that matters (which only really depends on proto::value and
> proto::child_c<N>, which are always inlined now).
> We also have another domain that does register-level computation, where
> construction overhead could be a problem. The last tests we did with
> this was a while ago and was with the default Proto behaviour. That
> particular domain didn't get sufficient testing to give real conclusions
> about the Proto overhead.

In that case, I will hold off making any core changes to Proto until I
have some evidence that it won't cause performance regressions.


Eric Niebler
BoostPro Computing

Proto list run by eric at