[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: %destructor feedback
From: |
Frank Heckenbach |
Subject: |
Re: %destructor feedback |
Date: |
Wed, 7 Dec 2005 04:20:25 +0100 |
User-agent: |
semail 20050409 |
Joel E. Denny wrote:
> On Wed, 7 Dec 2005, Frank Heckenbach wrote:
>
> > And doesn't it also prevent the compiler from putting e in a
> > register (when applied to a local variable), thus pessimizing the
> > code generated?
>
> If the variable is unused except for the one reference within YYUSE(), how
> much of an impact will it have if the compiler is unable to put it in a
> register?
Maybe a small one, though it does have to allocate space ...
> > And what about the yyunused variable? If it's declared locally, some
> > version of a compiler or lint may find that it's assigned a value
> > that's never used
>
> It is used at the next YYUSE() execution:
And for the last (or only) one?
> >, and if declared globally, a compiler cannot
> > readily optimize away the spurious assignment.
>
> Unless YYUSE() appears in a short loop (not in bison, I believe), wouldn't
> the performance penalty be trivial?
Probably, though if the macro is made available to the user, they
may use it in a short loop ...
> I ask these questions out of ignorance, but if you wouldn't mind
> entertaining them anyway, I'd appreciate it.
I'm wondering if any kind of performance penalty is justified only
to please lint ...
Frank
--
Frank Heckenbach, address@hidden
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan (7977168E)
- Re: 'lint' fixes for Bison-generated parsers, (continued)
- Re: %destructor feedback, Akim Demaille, 2005/12/07
- Re: %destructor feedback, Joel E. Denny, 2005/12/07
- Re: %destructor feedback, Akim Demaille, 2005/12/07
- Re: %destructor feedback, Joel E. Denny, 2005/12/07
- Re: %destructor feedback, Akim Demaille, 2005/12/19
- Re: %destructor feedback, Joel E. Denny, 2005/12/19
- Re: %destructor feedback, Frank Heckenbach, 2005/12/06
- Re: %destructor feedback, Joel E. Denny, 2005/12/06
- Re: %destructor feedback,
Frank Heckenbach <=
- Re: %destructor feedback, Joel E. Denny, 2005/12/06
- Re: %destructor feedback, Akim Demaille, 2005/12/07
- Re: %destructor feedback, Paul Eggert, 2005/12/07
- Re: %destructor feedback, Akim Demaille, 2005/12/07
Re: %destructor feedback, Akim Demaille, 2005/12/19