On Mon, May 31, 2010 at 6:29 PM, Larry Evans <cppljev...@suddenlink.net> wrote:

> However, that boost devel post claims using a switch statement would
> be faster.

Switching to C++ should never be excuse to bring more more brittle codes
or more obscurities.  Rather, it should be opportunity to write simpler and
better code.

The compiler has gotten better lately in devirtualization.  We are the compiler
guys.  If our implementation shows that we can do better with virtual functions,
then we should be improving the compiler -- not only we get a faster compiler,
but for the end user we get a compiler that generates much better code.  And
that is a win win.  None of that should be construed as an argument for using
virtual functions in GCC.  Rather, it is argument for resisting
desperate actions.

Reply via email to