[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: encapsulating code properties
From: |
Joel E. Denny |
Subject: |
Re: encapsulating code properties |
Date: |
Sun, 12 Nov 2006 12:55:38 -0500 (EST) |
On Sun, 12 Nov 2006, Paul Eggert wrote:
> "Joel E. Denny" <address@hidden> writes:
>
> > If your results differ from mine, please post the test grammar so
> > I can see what you're seeing.
>
> My benchmark was "time make check". I don't recall the timings right
> now, but it was a performance hit in the 1-2% range. If this were
> just one patch and it had some major countervailing advantage that
> would be fine, but I have the feeling that more patches like this
> are coming down the pike so I thought I'd raise the issue now.
Here are my timings using "time make check". old is CVS Bison.
code_props uses my original patch. code_props ptrs uses my original patch
but with your suggestion about passing pointers instead of copies of
code_props instances. Three trials each and then averages:
old code_props code_props ptrs
real 0m58.918s real 0m58.870s real 0m58.762s
user 0m45.319s user 0m45.347s user 0m45.307s
sys 0m12.841s sys 0m12.841s sys 0m12.709s
real 0m58.408s real 0m58.458s real 0m58.927s
user 0m45.195s user 0m45.239s user 0m45.203s
sys 0m13.057s sys 0m12.905s sys 0m12.817s
real 0m58.849s real 0m58.804s real 0m58.329s
user 0m45.307s user 0m45.159s user 0m45.419s
sys 0m12.925s sys 0m13.101s sys 0m12.685s
avg
real 0m58.725s real 0m58.711s real 0m58.673s
user 0m45.274s user 0m45.248s user 0m45.310s
sys 0m12.941s sys 0m12.949s sys 0m12.737s
My results disagree with yours.
> I'm afraid I'll have to disagree, at least for this particular case.
> The code will get even harder to read, the more we apply this kind of
> transformation. Instead of the proposed:
>
> rules[ruleno].action_location =
> code_props_location_get (p->action_props);
>
> we'll evolve to:
>
> action_location_set
> (rules[ruleno].action,
> code_props_location_get (something_something_something_get (p));
I see no problem with the latter case.
> > For me, the ALL_CAPS style seen in pre-Doxygen areas of Bison is
> > harder to read and offers no way to distinguish between some_name
> > and SOME_NAME, which might be two different symbols.
>
> I have less strong feelings about this, partly because I don't use
> Doxygen.
I'm not sure what you're saying. Are you willing to accept the "\c"?
Are you suggesting we drop Doxygen from Bison altogether?
- encapsulating code properties, Joel E. Denny, 2006/11/11
- Re: encapsulating code properties, Paul Eggert, 2006/11/11
- Re: encapsulating code properties, Joel E. Denny, 2006/11/12
- Re: encapsulating code properties, Paul Eggert, 2006/11/12
- Re: encapsulating code properties,
Joel E. Denny <=
- Re: encapsulating code properties, Paul Eggert, 2006/11/13
- Re: encapsulating code properties, Joel E. Denny, 2006/11/13
- Re: encapsulating code properties, Paul Eggert, 2006/11/13
- Re: encapsulating code properties, Joel E. Denny, 2006/11/13
- Re: encapsulating code properties, Joel E. Denny, 2006/11/13
Re: encapsulating code properties, Joel E. Denny, 2006/11/13