SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Technology Stocks : BORL: Time to BUY!

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Kashish King who wrote (8267)12/29/1997 1:26:00 PM
From: David R  Read Replies (2) of 10836
 
Rod, given the following code,

/*****************
class a
{
int virtual foo();
};

class b : public class a
{
int virtual foo();
};

class a* pA = new b;

pA->foo();

*****************/

Please tell me how the compiler will figure out which foo to call. This is a vtable hit. The several years ago approximation for VTable lookups was about 10% over straight function call. It is a penalty we willingly pay for the convenience of C++. COM, onthe other hand has no such penalty. Hence, inproc COM has nearly equal performance for normal function calls, and is much faster than vtable calls (which are a normal part of life in C++).
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext