logo       

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

parsers.spirit.devel

Subject: Re: Fusion-ifying proto parse trees

Joel de Guzman wrote:
Eric Niebler wrote:

OK, you're saying the problem is the performance of creating a view. You agree, though, that there's no sense redesigning proto until we do the performance testing that shows there is a problem that is best addressed that way. Otherwise, it's just premature optimization.

Fair enough. Let me remind you though that the competition is tough.
What we are up against (flattening the sequence up front in the
proto-ET stage) is zero-overhead. When you flatten the sequence
up front, you do as much as you can in a single stage, such that
the stage is already prepared when you go to the second; i.e. parsing.
I still believe that that's the way to go.


Here's why I think segmented Fusion algorithms will be as fast, or even faster, than flattening the sequence up front. Fusion algorithms are recursive, right? You process the current node and then recurse on the sequence [next(begin), end). But imagine how you would write the Fusion algorithms to handle binary trees specially. Instead of recursing once on next(begin), you would recurse *twice* on left(begin) and right(begin). Now generalize. :-) That's what the segmented algorithms are.

Once we have the segmented algorithms, I can write segmented iterators for proto trees, and the algorithms will Just Work with zero additional overhead. Do you believe me? :-)


Anyway, out of curiosity, how do you intend to do performance testing?
What will be your benchmark?


Good question. Care to write a proto-lite that pre-flattens so we can benchmark against it?


I'm going to spend some time thinking about segmented Fusion algorithms, because I think that's where we'll get the most bang for our buck.

That would be awesome!


Working on it.


--
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