bison-patches
[Top][All Lists]
Advanced

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

Re: push parser implemenation


From: Akim Demaille
Subject: Re: push parser implemenation
Date: Mon, 24 Apr 2006 11:03:00 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

>>> "Bob" == Bob Rossi <address@hidden> writes:

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

These figures are very encouraging!  I have a bit more loss in push
mode than you have (me: 9%, you: 2%), but anyway as I already said I
don't consider push-non-pure to be a requirement and I would not try
to support it.

(popt = push-opt)

popt-pure: 48 wallclock secs (36.65 cusr +  1.08 csys = 37.73 CPU) @  1.33/s 
(n=50)
popt-push: 74 wallclock secs (54.77 cusr +  1.25 csys = 56.02 CPU) @  0.89/s 
(n=50)
popt-yacc: 51 wallclock secs (37.94 cusr +  1.11 csys = 39.05 CPU) @  1.28/s 
(n=50)
push-pure: 58 wallclock secs (44.92 cusr +  1.21 csys = 46.13 CPU) @  1.08/s 
(n=50)
push-push: 61 wallclock secs (50.26 cusr +  1.20 csys = 51.46 CPU) @  0.97/s 
(n=50)
push-yacc: 57 wallclock secs (45.34 cusr +  1.16 csys = 46.50 CPU) @  1.08/s 
(n=50)
yacc-pure: 45 wallclock secs (36.84 cusr +  1.06 csys = 37.90 CPU) @  1.32/s 
(n=50)
yacc-yacc: 47 wallclock secs (37.97 cusr +  1.07 csys = 39.04 CPU) @  1.28/s 
(n=50)
             Rate popt-push push-push push-yacc push-pure popt-yacc yacc-yacc 
yacc-pure popt-pure
popt-push 0.893/s        --       -8%      -17%      -18%      -30%      -30%   
   -32%      -33%
push-push 0.972/s        9%        --      -10%      -10%      -24%      -24%   
   -26%      -27%
push-yacc  1.08/s       20%       11%        --       -1%      -16%      -16%   
   -18%      -19%
push-pure  1.08/s       21%       12%        1%        --      -15%      -15%   
   -18%      -18%
popt-yacc  1.28/s       43%       32%       19%       18%        --       -0%   
    -3%       -3%
yacc-yacc  1.28/s       43%       32%       19%       18%        0%        --   
    -3%       -3%
yacc-pure  1.32/s       48%       36%       23%       22%        3%        3%   
     --       -0%
popt-pure  1.33/s       48%       36%       23%       22%        3%        3%   
     0%        --

I don't really understand why the system time should differ
significantly between all our parsers (e.g., push-opt-pure 1.08
vs. push-opt-push 1.25; on another run I have 1.15 vs. 1.35).  Can
there be *good* reasons (ie., due to our programming only, not random
issues on the machine we run the bench on) for them to change like
this?  If there are no good reasons, then maybe we should try to bench
using just the user time.  Well, there must be good reasons, on my
machine at least the difference is stable.  It is also vastly
dependent on the optimization flags, with -O2 the difference is no
longer significant.

 popt-pure: 22 wallclock secs (17.73 cusr +  0.86 csys = 18.59 CPU) @  2.69/s 
(n=50)
 popt-push: 29 wallclock secs (25.25 cusr +  0.85 csys = 26.10 CPU) @  1.92/s 
(n=50)
 popt-yacc: 21 wallclock secs (18.53 cusr +  0.81 csys = 19.34 CPU) @  2.59/s 
(n=50)
 push-pure: 25 wallclock secs (20.83 cusr +  0.83 csys = 21.66 CPU) @  2.31/s 
(n=50)
 push-push: 26 wallclock secs (22.70 cusr +  0.84 csys = 23.54 CPU) @  2.12/s 
(n=50)
 push-yacc: 24 wallclock secs (21.37 cusr +  0.82 csys = 22.19 CPU) @  2.25/s 
(n=50)
 yacc-pure: 20 wallclock secs (17.71 cusr +  0.81 csys = 18.52 CPU) @  2.70/s 
(n=50)
 yacc-yacc: 22 wallclock secs (18.42 cusr +  0.81 csys = 19.23 CPU) @  2.60/s 
(n=50)
            Rate popt-push push-push push-yacc push-pure popt-yacc yacc-yacc 
popt-pure yacc-pure
popt-push 1.92/s        --      -10%      -15%      -17%      -26%      -26%    
  -29%      -29%
push-push 2.12/s       11%        --       -6%       -8%      -18%      -18%    
  -21%      -21%
push-yacc 2.25/s       18%        6%        --       -2%      -13%      -13%    
  -16%      -17%
push-pure 2.31/s       20%        9%        2%        --      -11%      -11%    
  -14%      -14%
popt-yacc 2.59/s       35%       22%       15%       12%        --       -1%    
   -4%       -4%
yacc-yacc 2.60/s       36%       22%       15%       13%        1%        --    
   -3%       -4%
popt-pure 2.69/s       40%       27%       19%       17%        4%        3%    
    --       -0%
yacc-pure 2.70/s       41%       27%       20%       17%        4%        4%    
    0%        --

So as far as I'm concerned, I'm ready to switch to a new skeleton.
Now let's focus on making the code nicer to read.  But what do the
other members of the team (the Pauls and Joel) think?

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

I have checked in the bench script in etc/, that will ease the
tracking of changes.  I have added other changes on top of yours.
I did not checkin the push parsers because I don't remember whether we
have all the copyright issues settled.  If we do, then how about
checking in your skeleton so that we can also easily track the
differences?  As long as the tarball is not touched, I see no problem
with adding files even before the 2.2 release.





reply via email to

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