|
Proto : |
Subject: Re: [proto] Transform result_of nightmare and preserving terminal identity
From: Eric Niebler (eric_at_[hidden])
Date: 2012-10-31 15:59:52
10/31/2012 12:30 PM, Agustín K-ballo Bergé wrote:
> On 16/10/2012 03:50 p.m., Agustín K-ballo Bergé wrote:
>> On 16/10/2012 02:22 a.m., Eric Niebler wrote:
>>> Hi Agustín,
>>>
>>> This is just a quick note to let you know that I'm currently at the
>>> standard committee meeting in Portland, and that I'll be unable to look
>>> until this until I get back next week.
>>>
>>
>> Thank you for letting me know.
>
> For future reference, my issue was resolved at StackOverflow. You can
> find it here
> http://stackoverflow.com/questions/13146537/boost-proto-and-complex-transform
Heh, answered by me! Funny, I thought Bart's solution on this list had
answered your question, so I didn't come back to it.
> Preliminar tests for 100000000 evaluations of a simple expression `p = q
> + r * 3.f` where p, q and r are geometric vectors of 3 ints give the
> following promising times:
>
> Regular: 1.15s
> Proto: 1.2s
> Hand-Unrolled: 0.39s
> Proto-Unrolled: 0.8s
>
> Proto expressions build and optimization times are not taken into
> account. There is a considerable number of expression copies made by the
> expression optimization that cannot be avoided by the compiler.
Expression copies ... during expression evaluation? I wonder why that's
necessary.
> I will
> continue my research by implementing a custom evaluation context that
> does this optimization 'on the fly', without actually modifying the
> expression.
Evaluation contexts are weaker than transforms. If it can't be done with
a transform, it can't be done with a context. I can't tell from the code
fragment what exactly you're doing with the transforms you've written,
or whether they can be improved.
-- Eric Niebler BoostPro Computing http://www.boostpro.com
Proto list run by eric at boostpro.com