I need some OOP advice
Polymorphism is not automatically slower. Using polymorphism when you know which one it is going to be can be a waste. It depends upon the compiler though. Some vtable lookups can be optimized out. If you don''t know then you are going to have to code the logic to figure it out if you don''t use polymorphism. Well you have to figure it out with polymorphism as well, but at least it is only when you instantiate rather than every time you use it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement