This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC/Patch] What about using seekoff(-1, ...) for unbuffered underflow?
- From: pcarlini at unitus dot it
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, ncm at cantrip dot org
- Date: Fri, 6 Jun 2003 17:21:07 +0200
- Subject: Re: [RFC/Patch] What about using seekoff(-1, ...) for unbuffered underflow?
- References: <3EE0876C.4060004@unitus.it> <20030606095012.395f7e53.bkoz@redhat.com>
> >I'm looking a bit into the new framework for unbuffered input,
> >and I'd rather prefer having sbumpc() simple as it was before.
>
> ... and seeking after every input? Don't think that's going to fly.
> There have been performance bugs about this in the past.
Well, seeking after every _unbuffered getc()_ (vs. buffered and/or sbumpc)!
On the other hand, an heavier sbumpc() affects any sbumpc(), buffered or not
and I think that, for top performance, people really want a fast unbuffered
sbumpc(). Also, the underflow call should be checked for its return value.
Paolo.