AIX I/O failures
Gabriel Dos Reis
gdr@codesourcery.com
Thu Jan 25 16:40:00 GMT 2001
Mark Mitchell <mark@codesourcery.com> writes:
| >>>>> "Gabriel" == Gabriel Dos Reis <Gabriel.Dos-Reis@cmla.ens-cachan.fr> writes:
|
| Gabriel> Given that cout would be a global reference, we know (at
| Gabriel> worst) at link time which object it is refering to and
| Gabriel> treat it identical to the refered-to object.
|
| I see, you're assuming the optimizer will remove the indirection.
|
| I think the compiler won't do this because the definition of the
| reference won't appear in the header file, in your proposal.
OK. But note also that most uses of IOStreams already require
references, so actually, the hypothetical performance lost won't be
measurable in real world programs because cin/cout will be used where
references are expected -- that might explain why Phil is seeing
identical code generation.
| You're right that a link-time optimizer could in principle do this.
I miss low-level optimizers :-)
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Libstdc++
mailing list