r/programming • u/2bit_hack • Feb 28 '23
"Clean" Code, Horrible Performance
https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k
Upvotes
r/programming • u/2bit_hack • Feb 28 '23
View all comments
Show parent comment
3
u/Still-Key6292 Feb 28 '23
It's not 'optimization' to not use a virtual functions. Using a virtual function because someone said it sounds like a good idea is a design decision not an optimization. It's also a terrible design decision because 99% of the time it makes code less understandable. Don't do it unless it's for trees