bison-patches
[Top][All Lists]
Advanced

[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: Thu, 20 Apr 2006 13:02:56 -0400
User-agent: Mutt/1.5.9i

On Thu, Apr 20, 2006 at 12:08:57PM +0200, Akim Demaille wrote:
> >>> "Akim" == Akim Demaille <address@hidden> writes:
> 
>  > The 15% loss I observed seem acceptable to me, but we should strive to
>  > get rid of them.
> 
> Well, I seem to have imagined that 15%.
> 
>             Rate push-push push-yacc push-pure yacc-yacc yacc-pure
> push-push 2.12/s        --       -6%       -8%      -19%      -22%
> push-yacc 2.26/s        6%        --       -2%      -13%      -17%
> push-pure 2.32/s        9%        3%        --      -11%      -15%
> yacc-yacc 2.61/s       23%       15%       13%        --       -4%
> yacc-pure 2.71/s       28%       20%       17%        4%        --
> 
> Really, there is no reason to make non pure parsers :)  I wish I could
> deprecate this feature.

OK, what do you think of this patch? Again, I didn't bother cleaning
it up to much, I'll do that if the numbers are acceptable. What do you
think of the numbers? For some reason the push_opt yacc parser is faster
than the regular yacc parser. Go figure.

Benchmark: timing 50 iterations of push-opt-pure, push-opt-push, push-opt-yacc, 
push-pure, push-push, push-yacc, yacc-pure, yacc-yacc...
push-opt-pure: 29 wallclock secs (28.03 cusr +  0.35 csys = 28.38 CPU) @  
1.76/s (n=50)
push-opt-push: 43 wallclock secs (42.58 cusr +  0.32 csys = 42.90 CPU) @  
1.17/s (n=50)
push-opt-yacc: 28 wallclock secs (27.37 cusr +  0.31 csys = 27.68 CPU) @  
1.81/s (n=50)
    push-pure: 35 wallclock secs (34.51 cusr +  0.32 csys = 34.83 CPU) @  
1.44/s (n=50)
    push-push: 42 wallclock secs (41.67 cusr +  0.30 csys = 41.97 CPU) @  
1.19/s (n=50)
    push-yacc: 35 wallclock secs (34.78 cusr +  0.32 csys = 35.10 CPU) @  
1.42/s (n=50)
    yacc-pure: 28 wallclock secs (28.05 cusr +  0.31 csys = 28.36 CPU) @  
1.76/s (n=50)
    yacc-yacc: 28 wallclock secs (27.50 cusr +  0.31 csys = 27.81 CPU) @  
1.80/s (n=50)
                Rate push-opt-push push-push push-yacc push-pure push-opt-pure 
yacc-pure yacc-yacc push-opt-yacc
push-opt-push 1.17/s            --       -2%      -18%      -19%          -34%  
    -34%      -35%          -35%
push-push     1.19/s            2%        --      -16%      -17%          -32%  
    -32%      -34%          -34%
push-yacc     1.42/s           22%       20%        --       -1%          -19%  
    -19%      -21%          -21%
push-pure     1.44/s           23%       20%        1%        --          -19%  
    -19%      -20%          -21%
push-opt-pure 1.76/s           51%       48%       24%       23%            --  
     -0%       -2%           -2%
yacc-pure     1.76/s           51%       48%       24%       23%            0%  
      --       -2%           -2%
yacc-yacc     1.80/s           54%       51%       26%       25%            2%  
      2%        --           -0%
push-opt-yacc 1.81/s           55%       52%       27%       26%            3%  
      2%        0%            --

I've attached push_opt.c, and the new bench.pl script I'm using. You can
diff it to yours to see the difference.

Thanks,
Bob Rossi

Attachment: bench.pl
Description: Text Data

Attachment: push_opt.c
Description: Text Data


reply via email to

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