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]

Re: Speed impact of virtual inheritance


Frans Englich wrote:

> In a large project I'm participating in, a design dilemma have arrived. Adding 
> virtual inheritance would solve it beautifully on the source code level, but 
> a potential drawback is the speed penalty it brings. Measurement is always 
> the way of approaching performance questions, but since that sometimes can be 
> tricky, I thought of starting with getting a theoretical understanding of 
> virtual inheritance.

If you don't mean "virtual inheritance as implemented by GCC" then this
is probably the wrong place for such a question.

For an understanding of how it's implemented try "Inside the C++ Object
Model" by Stan Lippmann, and this draft report (especially section 5.3.6)
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1666.pdf

That's by a well-respected member of the standard committee, so you can
take it pretty seriously.  I'd certainly give it more credence than
unsubstantiated claims thrown up by googling.

Regards,

jon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]