Yes, using built-in virtual functions is a waste of time. A virtual function must be called through a table of virtual functions, which consists of function pointers. A pointer cannot call an inline function. It must exist as a real function.
There are some exceptions. If the caller knows the exact type of object, he can completely skip the virtual function table.
Excessive use of the virtual keyword can lead to very slow code. If the compiler can embed and optimize three or four small function calls, with virtual functions, it must make the actual function calls without making any assumptions about the memory or registration status between calls.
source share