This is the mail archive of the gcc-help@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: Comparative performance of C(gcc) and C++(g++)


There is the virtual method issue too...

Making and using interfaces through the use of virtual functions forces the 
compiler to generate extra code that looks up the method's address in the 
object's virtual table before actually calling the method. This can lead to 
performance issues. It's up to you to settle the trade between speed and code 
elegance.

This too is one of those things unexperienced/naive programmers can use 
inappropriately.


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