Polymorphism cost | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Polymorphism cost

Polymorphism is not for free. We need to pay some cost of price for that. Two of the I know are. 1. Memory cost of virtual table. 2. Run time cost of dynamic binding. Please suggest other cost reasons.

21st Dec 2017, 2:10 AM
$ยข๐Žโ‚น๐”ญ!๐จ๐“
$ยข๐Žโ‚น๐”ญ!๐จ๐“ - avatar
1 Answer
+ 1
hello, Here I have added static polymorphism code, someone please tell it's disadvantage over dynamic polymorphism. https://code.sololearn.com/cLEZPYlqlvKl/?ref=app
21st Dec 2017, 4:23 PM
$ยข๐Žโ‚น๐”ญ!๐จ๐“
$ยข๐Žโ‚น๐”ญ!๐จ๐“ - avatar