This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/4470: Thousands of seeks per read from cin
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, kw+gnats at cs dot cmu dot edu, nobody at gcc dot gnu dot org
- Subject: Re: libstdc++/4470: Thousands of seeks per read from cin
- From: ljrittle at gcc dot gnu dot org
- Date: 4 Oct 2001 22:49:44 -0000
Synopsis: Thousands of seeks per read from cin
State-Changed-From-To: open->analyzed
State-Changed-By: ljrittle
State-Changed-When: Thu Oct 4 15:49:44 2001
State-Changed-Why:
You have hit a known issue. There are two things
you can try:
Add _GLIBCPP_AVOID_FSEEK to the os_defines.h file for your
port. That will remove all useless seeking for your example
(at least it does on my platform).
Add a line of code to your example at the head of main:
std::ios_base::sync_with_stdio (false);
Until libio is directly supported again, performance on
Linux may be (much) worse for some code examples compared
to libstdc++-v2.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4470&database=gcc