------- Comment #20 from paolo dot carlini at oracle dot com  2010-09-09 14:53 
-------
Good about POSIX, we would add a configure time test with some hope to enable
the mechanism outside Linux too. Anyway, I'm sure your kind of loop would
improve the performance a lot - if only we could have it without breaking the
ABI I would be in favor of having it immediately - still, we would still use a
single char function, I think the complexity for long lines would still scale
badly. As a matter of fact, I think the only completely satisfactory design
would be that used by the old v2, with a low level libio layer, doing buffering
and the low level operations, and used by the C and C++ libraries on top.
Missing that, I don't think the C++ library, working purely on top of the
Standard C library will ever be able to performe as well as C in the synced
mode. The only hope could be exploiting, on Linux systems, a glibc *extension*
(we do that in many other cases), like an fgetc not writing '\0' and newline,
which the glibc people would essentially provide exactly to help the C++
library implementation. Anyway, sorry if I may have appeared a little too harsh
in my first replies, the fact is I know the history of these facilities, I know
all the effort other people besides me put to have a good overall compromise
(eg, stdio_sync isn't mine and solved a *a lot* of problems), we are certainly
open to improvements, but realistic ones, at least until we break all the ABIs.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45574

Reply via email to