[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FW: inline constructors and assignment operators
From: |
Thomas Maeder |
Subject: |
Re: FW: inline constructors and assignment operators |
Date: |
Sun, 12 Feb 2006 09:18:22 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux) |
"Michael D. Berger" <m.d.berger@ieee.org> writes:
>> > "Physically", modifications on an inline member function require
>> > tranlation units depending on the definition of the member's
>> > class to be recompiled. Modifications of encapsulated member
>> > functions' definitions only require the translation unit
>> > containing the modified member functions' definitions to be
>> > recompiled. This can be a huge difference.
>>
>> My inline methods are kept in separate files are included at the
>> bottom of the .hh files. How does this impact condiderations of
>> encapsulation and recompile time.
Not at all. This method may lead to nice results for the human reader,
but it doesn't influence build dependencies.
>> Additionally, while I did not originally say so, my main concern is
>> execution performance. Are there any issues here?
Compilers will consider inline members for inlining more often than
out of line members, so yes, making a constructor inline may have an
impact.
Whether it has an impact for your program is a different question. I'd
only inline a member function if a profiler suggested to me that doing
so could have an impact.
> My apologies.
Apology accepted.
> I did not notice that this list
This is a newsgroup, not a list.
> is inappropriately set to prefer private replies.
I don't know what this means.