This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Some experiments with cpplib's output end
- To: mike stump <mrs at windriver dot com>
- Subject: Re: Some experiments with cpplib's output end
- From: Zack Weinberg <zack at codesourcery dot com>
- Date: Thu, 27 Sep 2001 14:22:48 -0700
- Cc: neil at daikokuya dot demon dot co dot uk, gcc at gcc dot gnu dot org
- References: <200109271417.HAA24399@kankakee.wrs.com>
On Thu, Sep 27, 2001 at 07:17:05AM -0700, mike stump wrote:
> > Date: Thu, 27 Sep 2001 07:44:02 +0100
> > From: Neil Booth <neil@daikokuya.demon.co.uk>
>
> > I wonder if we're better something simple and braindead, like our
> > own scratch buffer of size roughly 8K say, that we manage ourselves
> > and only dump (probably bypassing stdio) when it's about to
> > overflow?
>
> Gosh, I think someone wrote a library like this at one time, maybe we
> could hunt around and see if we can find it and use it. I thunk it
> was called stdio if I recall.
The whole point of this series of experiments was to see if we could
get better performance out of standalone cpplib without going so far
as to reimplement stdio.
A custom implementation is always going to be faster, since it will
not have any of the overhead stdio incurs for being generally useful.
The question is whether this is worth the trouble of implementing and
debugging it. I'm currently willing to stop at the 15% or so
improvements I get from the changes suggested by my experiments; cpp0
is mostly not used these days, so its performance is less important.
On the other hand, if we had evidence that cc1 was wasting lots of
time in stdio doing assembly output, I would reconsider.
zw