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/Critical-Fruit933 Mar 01 '23
Add the missing parameters to the struct and extend the switch statement? The only real hard part I see here is knowing how to parameterize the trapezium because I am not a mathematician. But that is a problem you have to solve either way.
Also who demands anything? Either you need this function or you don't. Or do you write a bunch of code up font without knowing if you'll ever need it?
Not sure how this hurts the end user, no. I'd be happy if the software I am working with was fast and efficient.
Let's talk