|
|
|
|
|
by Coding_Cat
3252 days ago
|
|
The call itself is not very expensive, but the effect of having to jump through vtables can prevent other optimizations in a way similar to calling a function in a DLL. Not a huge issue for business logic bits or if your virtual functions are quite large, but using virtual functions for small often used calls such as specific getters or some mathematical function can cause a big performance hit. |
|
This only becomes relevant in hot loops, but inlining can give big wins when combined with other optimizations.