r/cpp • u/david-alvarez-rosa • Apr 23 '26
Devirtualization and Static Polymorphism
https://david.alvarezrosa.com/posts/devirtualization-and-static-polymorphism/
81
Upvotes
r/cpp • u/david-alvarez-rosa • Apr 23 '26
View all comments
Show parent comment
1
u/johannes1971 Apr 24 '26
No, it's not a reach. But we should also keep a sense of perspective about this, and statements like "calling virtual functions leads to underperformance in benchmarks" very quickly start leading a life of their own, causing people to write convoluted CRTP code when that is absolutely not necessary.