For normal functions, this is enough with a “jump” to them, which is very fast. The same goes for normal member functions. On the other hand, virtual functions, the address to go to the table must be extracted from the table, which, of course, is associated with more machine code and, therefore, will be slower. However, the difference is insignificant and hardly even measurable.
In other words, do not worry about it. If you have a slowdown, then this is most likely (for example, 99.999%) something else. Use the profiler to find out where.
source share