SOLID & OOP Principles (50 Qs)•Part 3: Enterprise Architecture, Package Design & Enforcement (25 - 35)
What is Static vs Dynamic Polymorphism and what are their performance trade-offs?
senior LevelFormsPerformanceSystem Design
In Simple Words:
- Dynamic Polymorphism: Virtual method dispatch via v-tables at runtime; flexible but adds pointer indirection.
- Static Polymorphism: Generics and templates resolved at compile-time; zero runtime overhead and can be inlined.