This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/2211
- To: bkoz at gcc dot gnu dot org
- Subject: Re: libstdc++/2211
- From: Paolo Carlini <pcarlini at unitus dot it>
- Date: 27 Jun 2001 21:36:03 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: Paolo Carlini <pcarlini at unitus dot it>
The following reply was made to PR libstdc++/2211; it has been noted by GNATS.
From: Paolo Carlini <pcarlini@unitus.it>
To: bkoz@gcc.gnu.org, gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
gcc-bugs@gcc.gnu.org, Theodore.Papadopoulo@sophia.inria.fr
Cc:
Subject: Re: libstdc++/2211
Date: Wed, 27 Jun 2001 23:27:51 +0200
Hi all,
Benjamin, I have just read your reply concerning the use of
std::ios::sync_with_stdio(false).
Therefore I tried my favorite test, that is a short program from the 2nd
Ed. of Programming Pearls by Jon Bentley:
-----------
/* Copyright (C) 1999 Lucent Technologies */
/* From 'Programming Pearls' by Jon Bentley */
/* wordlist.cpp -- Sorted list of words (between white space) in file */
#include <iostream>
#include <set>
#include <string>
using namespace std;
int main()
{
set<string> S;
string t;
set<string>::iterator j;
while (cin >> t)
S.insert(t);
for (j = S.begin(); j != S.end(); ++j)
cout << *j << "\n";
return 0;
}
------------
On my Linux-x86 box, I don't see significant speed differences bring
about by std::ios::sync_with_stdio(false).
Indeed, I always see a significant run time regression vs libstdc++v2
(between 2x and 3x, unfortunately) when processing a long test file
(usually I use electronic version of "The King James Bible", 4445260
chars, for this purpose)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2211&database=gcc