[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    Re: Strange behaviour in C++...
From:       Benjamin Scherrey <scherrey () switchco ! com>
Date:       1999-08-26 3:52:41
[Download RAW message or body]

I actually use MI on more occasions than I thought I would (and way
more than most applications developers) but I still concur. Embedded
in every competent OO-programmer's mind is that MI comes at a cost.
The philosophy that Stroustrup embarked on, "you don't pay for what
you don't use", is one of the single most important reasons that C++
has been so successful today and was able to win the hearts and minds
of so many C coders when Objective-C could not. Virtual calls are
expensive enough (and often overused as well). To add an additional
cost because of the MI implementation, even when MI isn't being used
is an unacceptable consequence. I don't mind paying the cost
(especially speed vs. size) when I determine that MI is the correct
solution.

	regards,

		Ben Scherrey

PS: This isn't explicitly a vote for thunks, per se, but rather for
the philosophy for which the thunk implementation seems to be a good
supporting solution. I'd support the best implementation that keeps
the philosophy intact.

Joe Buck wrote:
> Yes, I understand this.  However, C++ programmers very rarely use multiple
> inheritance (because it isn't that well designed in the language and
> generally more trouble than it is worth).  Let's say that the
> penalty for a thunk is 20-30 cycles.  It would still be better than the
> alternative, because without thunks you must pay, on every virtual
> function table, for the possibility that multiple inheritance is involved,
> and the offset that is added is zero in almost all cases (including
> many of the MI cases).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic