libstdc++/4150: catastrophic performance decrease in C++ code

Jason Merrill jason@redhat.com
Mon Apr 22 05:30:00 GMT 2002


>>>>> "Benjamin" == Benjamin Kosnik <bkoz@redhat.com> writes:

> Here's a patch against mainline. Jason, 'make check-script' also
> compares the generated output from the 27_io tests and diffs them
> against known good output. Your patch changes filebuf_virtuals-3.txt,
> but after looking at it, I think it might be evidence of the bug you
> mentioned earlier.

No, it turns out to be the equal but opposite bug; with my patch, if you do
a sputc followed by an sungetc, _M_out_cur is unchanged, and no write is
done.  So if you always write from _M_out_beg to _M_out_end, you get
spurious writes, and if you don't, you lose writes.  Both because read
operations have confused things.

I think that the interleaving just won't work, and that the right answer is
to go back to the libio design.

Jason



More information about the Libstdc++ mailing list