[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push parser implemenation

From: Bob Rossi
Subject: Re: push parser implemenation
Date: Mon, 17 Apr 2006 22:19:50 -0400
User-agent: Mutt/1.5.9i

On Mon, Apr 10, 2006 at 03:44:07PM -0400, Bob Rossi wrote:
> On Sat, Apr 08, 2006 at 02:58:45PM -0400, Bob Rossi wrote:
> > On Fri, Apr 07, 2006 at 02:42:29PM +0200, Akim Demaille wrote:
> > > Bob,
> > > 
> > > I'm starting to toy with your implementation, and to try to bench it.
> > > It seems that there is about a 15% performance loss of push.c compared
> > > to yacc.c, both used in pull mode without compiler optimization on my
> > > Mac.
> > 
> > You know, it would be possible to only create the structure for the push
> > parser mode, and to leave all variables declared in yyparse for normal
> > mode and for pure mode. This would be more m4 magic, but would fix the
> > performance problems.
> > 
> > I wrote it the way it is now because it was cleaner. I only had to do m4
> > magic for 'pv->yychar' vs 'yychar' for the 4 user visible variables
> > (instead of all the variables), because all 3 versions used the structure.
> > 
> > What do you think?
> Is this something I should do?

Hi everyone, I hope I can get some suggestions soon. I don't want this
to be forgotten about. 

Either we can make the push parser a separate file, we can allow the
user to loose the 10% speed performance, I can attempt to do the above
suggestion, or

I can see what happens if I declare the struct globally, and when in
push-yacc and pure-yacc mode, declare variables on the stack with the
same name as the struct's fields. This may improve the speed.

Any of these ideas sound good?

Bob Rossi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]