misc/66941: Unacceptable stringstream performance
jwakely at mintel.com
Wed Jun 2 02:30:11 PDT 2004
The following reply was made to PR misc/66941; it has been noted by GNATS.
From: "Jonathan Wakely" <jwakely at mintel.com>
To: David Schultz <das at FreeBSD.ORG>
Cc: FreeBSD-gnats-submit at FreeBSD.ORG, freebsd-bugs at FreeBSD.ORG
Subject: Re: misc/66941: Unacceptable stringstream performance
Date: Wed, 2 Jun 2004 10:17:22 +0100
Forgot to CC the bug trackers:
> I believe it lives in
> in the FreeBSD repository, and in
> in the gcc repository. It is subsequently installed as
> /usr/include/g++/sstream when libstdc++ is installed.
No, this is wrong. These are completely different files, both files you
list above are the libstdc++-v3 version for GCC 3.x
I'm talking about the sstream header for GCC 2.95.4 which does not exist
in the official GCC 2.95 branch; see the URL I posted previously, which
shows the file is in the Attic of the libstdc++ directory, which is for
v2 of the library.
In the FreeBSD 4.x tree this file is /usr/src/contrib/libstdc++/sstream.
Where that file lives in FreeBSD 5.x is irrelevant.
GCC 2.95 used libstdc++-v2, and the sstream header used by FreeBSD
2.95.4 was written for use with v2.
For GCC 3.x there was a complete rewrite of the C++ library,
libstdc++-v3. FreeBSD 5.x uses v3.
As a maintainer of libstdc++-v3 I can assure you that any bug reported
against v2 will be ignored.
So if FreeBSD 4.x is going to continue to ship this sstream (which
remember, was never officially sanctioned by any GCC release) then it is
up to the maintainer of the FreeBSD GCC 2.95.4 tree to fix this header.
> I glanced at the gcc repository and FreeBSD 5.2-CURRENT, and it
> appears that the file has changed significantly since gcc 2.95.
It's a complete rewrite. In both cases you're looking at GCC 3.x
sources, I'm talking about a bug in the 2.95 sources.
> However, AFAICT, it still has the same bug. Unless I'm missing
> something, you probably want to report this problem to the gcc
> folks. I'm not the right person to say whether the fix will find
> its way back into FreeBSD 4.X, though.
You're missing something.
The header I'm talking about comes with GCC 2.95.4 which is not an
official GCC release, it was made by the FreeBSD team. The header in
question was removed from the official GCC 2.95 branch but shipped
anyway by FreeBSD team.
Comparing the header to it's libstdc++-v3 replacement in the FreeBSD 5.x
tree is completely pointless, they're totally unrelated.
Since 4.x is still the recommended stable release and our company, and
numerous others, will not be moving to FreeBSD 5 (and therefore GCC 3)
for some time this bug causes a serious performance problem in the
stable release's default C++ compiler.
I know the bug is not present in GCC 3, as I help maintain it, but
FreeBSD 4 still uses GCC 2.95 where this bug is very present. Someone in
the FreeBSD team added that file to the sources, so there must be
someone who can fix it as well - I've supplied the patch!
More information about the freebsd-bugs