r/cpp • • Apr 23 '26

Devirtualization and Static Polymorphism

https://david.alvarezrosa.com/posts/devirtualization-and-static-polymorphism/
81 Upvotes

36 comments sorted by

View all comments

Show parent comment

3

u/[deleted] Apr 24 '26 edited Apr 24 '26

[removed] — view removed 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.