re PR libstdc++/11722 ([3.4 only] Unbuffered filebuf::sgetn is slow)
authorPaolo Carlini <paolo@gcc.gnu.org>
Mon, 13 Sep 2004 22:21:34 +0000 (22:21 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 13 Sep 2004 22:21:34 +0000 (22:21 +0000)
commitc56e3d82fc9090d1580ca8dc02a6add848629d0c
tree8997f3bc677ca038f84fb3bcc2ce4cfd4abbc203
parent90c609e51aab3794230d1eae447a9dac825d6a57
re PR libstdc++/11722 ([3.4 only] Unbuffered filebuf::sgetn is slow)

2004-09-13  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/11722
* include/std/std_fstream.h (xsgetn): Declare only.
* include/bits/fstream.tcc (xsgetn): Define, optimize for the
always_noconv() case: when __n > __buflen, copy the available
buffer and issue a direct read.
* testsuite/performance/27_io/filebuf_sgetn_unbuf.cc: New.

* include/bits/fstream.tcc (xsputn): Minor tweak, reorder a
conditional.

From-SVN: r87453
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/include/std/std_fstream.h
libstdc++-v3/testsuite/performance/27_io/filebuf_sgetn_unbuf.cc [new file with mode: 0644]