This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wed, Nov 21, 2012 at 7:07 AM, Tobias Grosser <tobias@grosser.es> wrote:On 11/20/2012 08:32 PM, Basile Starynkevitch wrote:
On Tue, Nov 20, 2012 at 11:24:40AM -0800, Lawrence Crowl wrote: [....]
All of these functions come in two forms.
function (FILE *, item_to_dump, formatting) function (item_to_dump, formatting)
Since we have switched to C++, it would be really nice to have dump functions writing to a C++ std::ostream
If I understood correctly, including iostream may (depending on your c++ library) introduce static constructors in every translation unit.
This is obviously false on the fac
e of it. Only the translation that includes iostream gets the niftty counters.
Furthermore, not including iostream does not mean you don't get static constructors -- GCC has lot of global variables and if any of them incures dynamic initialization, you get dynamic initialization. Note also that if you explicitly delay initialization to runtime, you are going to pay for it anyway through brittle manual initialization.
This could negatively impact the startup time of gcc.
Do you have concrete data point on this specific case? (I am not asking for artificial benchmark)
The cost you get with iostream isn't with dynamic intiialization, it is with something else (notably locales.)
Cheers Tobi
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |