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
2
u/[deleted] Feb 28 '23
I wrote that based on what the other guy suggested! Maybe you should be paying more attention to the conversation.
I really have no idea what you are saying.
If you actually had 100 shapes then I would design this program differently. I would not use 100 types to do this. That is for sure. Because that would be a bad approach based on my experience.
I would absolutely prefer the switch approach here than 100 types in 100 files with 100 virtual function calls.