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: Neil Booth who wrote (8305)12/30/1997 2:37:00 PM
From: David R  Read Replies (1) of 10836
 
Neil and Rod,

I am certainly not a C++ expert. So this is a highly unqualified statement. Please correct me where I am wrong.

If you call a virtual function of a derived class using the base class pointer, run-time type checking must be done in order to insure that the proper method is called. Since the compiler does not know what the vtable will look like at compile time, it can not make a straight vtable dereference. This is not the case if you use the derived class to call the method. In that case, it can be resolved at compile time from the vtable. Hence, there is (or might be) additional overhead when using VTables.
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext