MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/uy3ong/dynamic_polymorphism_performance/ia1yi9h/?context=3
r/cpp • u/Playful-Suspect9313 • May 26 '22
15 comments sorted by
View all comments
3
Also would be interesting when compiler can optimize dynamic polymorphism. I mean (as I remember) compiler can use concrete type if it’s obvious what to use.
2 u/dodheim May 26 '22 Agreed, analyses of LTO and -fwhole-program-vtables would have been interesting. 1 u/goranlepuz May 26 '22 Indeed, in the TFA example the compiler really should be able to switch to a normal call.
2
Agreed, analyses of LTO and -fwhole-program-vtables would have been interesting.
-fwhole-program-vtables
1
Indeed, in the TFA example the compiler really should be able to switch to a normal call.
3
u/DerShokus May 26 '22
Also would be interesting when compiler can optimize dynamic polymorphism. I mean (as I remember) compiler can use concrete type if it’s obvious what to use.