logo       

Re: Fusion-ifying proto parse trees: msg#00046

parsers.spirit.devel

Subject: Re: Fusion-ifying proto parse trees

Joel de Guzman wrote:
Eric Niebler wrote:
What do you think? Zero-copy expression template construction and segmented iteration over the tree -- I think there's potential there.

Or, simply use the raw view returned from push_back without doing
a fusion::as_list call. That also amounts to zero-copy expression
template construction.


Yes, sure but then the view returned by push_back will be, essentially, a proto parse tree. :-) And you'll want Fusion algorithms to work efficiently with them, so they should use a segmented iteration scheme. In other words, a Fusion join_view is a text-book example of a segmented data structure. If we add segmented algorithms to Fusion, they'll work better with your lazy views.


Pardon my stubbornness. It's just that I always strive to arrive
at the simplest solution. For Spirit-2, I'd like to adhere to the
mantra that "less is more". Then here we are again adding complexity
to tackle what I view as a simple need. I understand that you also wish
to make proto "as simple as possible", but what we are doing seems
more like moving the complexity somewhere else, and in the process,
ultimately adding more complexity to address the need.


IMO, Fusion needs this extra complexity. Efficient evaluation of lazy sequences should be Fusion's bread and butter. Did you see how much faster segmented proto was over non-segmented proto? Today's join_views == non-segmented proto == the slow badness. Segmented join_views == mmm, tasty goodness. :-)

I'm also not sure how much complexity there really is. My impression is that making a non-segmented algorithm into a segmented one is a fairly mechanical translation. We may even get by with some Boost.PP magic to do it for us. I haven't tried making a segmented view, but I'm guessing that's fairly mechanical, as well. It's certainly worth looking into IMO, but I'm not trying to deceive you -- this would be a sea-change for Fusion.


Ok... I'd really want to take a step back and meditate on this.
I'd like to re-think the "flatness" requirement in hopes of
eliminating it. If that is indeed possible, then we have a
win-win situation.


OK, cool.


--
Eric Niebler
Boost Consulting
www.boost-consulting.com


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise