This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11722] [3.4 only] Unbuffered filebuf::sgetn is slow
- From: "cvs-commit at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Sep 2004 11:27:06 -0000
- Subject: [Bug libstdc++/11722] [3.4 only] Unbuffered filebuf::sgetn is slow
- References: <20030730090653.11722.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-19 11:26 -------
Subject: Bug 11722
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: paolo@gcc.gnu.org 2004-09-19 11:26:48
Modified files:
libstdc++-v3 : ChangeLog
libstdc++-v3/include/std: std_fstream.h
libstdc++-v3/include/bits: fstream.tcc
Added files:
libstdc++-v3/testsuite/performance/27_io: filebuf_sgetn_unbuf.cc
Log message:
2004-09-19 Paolo Carlini <pcarlini@suse.de>
* include/bits/fstream.tcc (xsgetn): Slightly tweak conditional,
as per Nathan's original suggestion.
2004-09-19 Nathan Myers <ncm@cantrip.org>
* include/bits/fstream.tcc (xsgetn): Slightly tweak the recent fix
for 11722: copy can replace move; the common case is __avail == 0.
2004-09-19 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.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2224.2.174&r2=1.2224.2.175
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/std/std_fstream.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.61&r2=1.61.6.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/fstream.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.116.4.6&r2=1.116.4.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/performance/27_io/filebuf_sgetn_unbuf.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.10.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11722