[Top][All Lists]

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

Re: push parser implemenation

From: Paul Eggert
Subject: Re: push parser implemenation
Date: Thu, 07 Sep 2006 16:19:07 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Bob Rossi <address@hidden> writes:

> If you are saying "one method" for "one technique of setting data",

Yes, that's what I meant.

>> Is it easy to switch between push and pull mode at runtime?  If so,
>> it should be a runtime switch.  (If not, then not.  :-)
> I could probably add that functionality with a few changes to the
> parser, but currently it doesn't do it.

If it's too much of a pain, or would slow things down, I wouldn't bother.

> Currently, push.c slows down the yacc parsing by between 2-8%, reported
> by me and Akim.

Sounds a bit much, I'm afraid.  So we need a way of having straight
traditional yacc parsing.

> I was just wondering if C++ people would use delete. Made me wonder
> if we should write a pvvarsdestroy function.

Perhaps.  I don't use C++ so I'm the wrong guy to ask.  Akim can
chime in here, perhaps.

>> Is there any reason struct yypvars should be opaque?
> The only reason I made it opaque is because it seemed that never before
> had any of the variables been visible in the global scope. When using
> the pure parser, only 4 variable were made visible. Do you want me to
> make them all visible?

I don't have a strong feeling about it.  However, if making it opaque
hurts performance that's an argument for making it less opaque.  Stuff
in the yy/YY namespace is "opaque" anyway.

> Here is the current timing info, what do you think?
>             Rate push-push yacc-yacc yacc-pure push-pure push-yacc
> push-push 1.93/s        --      -30%      -31%      -32%      -34%
> yacc-yacc 2.73/s       42%        --       -3%       -4%       -6%
> yacc-pure 2.81/s       46%        3%        --       -1%       -3%
> push-pure 2.85/s       48%        4%        1%        --       -2%
> push-yacc 2.90/s       51%        6%        3%        2%        --

Sorry, I don't know what the numbers mean, or what things like
"push-push" mean.

> I could copy all the pure tests, and change the to push tests. What do
> you think of that?

OK, but I'd rather not make copies, but instead would rather reuse the
original tests but make them parameterized.  But that should be fairly

How much more time would this cause "make check" to take?  If it's
not too bad, then duping the pure tests sounds fine.

reply via email to

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