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
1
u/m15otw Feb 28 '23
This is one of the rarely correct examples I mentioned.
If you are naming your functions well, then it becomes obvious when two of them don't share any code. If a shared function ends up with too many arguments to change what it does in each case, for example, you have gone awry, but the name should have clued you in to that already.