Virtual functions have the same speed
Posted Jun 18, 2008 20:54 UTC (Wed) by
khim (subscriber, #9252)
In reply to:
Sometimes C++ is faster by johnkarp
Parent article:
Converting GCC to C++
Remember - for a long, long time C++ compiler was C++-to-C compiler. Only one thing can not be efficiently implemented in C++-to-C compiler: exceptions. Everything else is just as efficient in C and in C++... except templates: where C++ compiler can generate series of functions automatically in C you either need horrible preprocessor cludges and/or code duplication.
Of course the same capability can be easily abused and lead to slower code!
(
Log in to post comments)