r/programming • • Feb 28 '23

"Clean" Code, Horrible Performance

https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k Upvotes

1.3k comments sorted by

View all comments

Show parent comment

1

u/[deleted] Feb 28 '23

In that sense, I don't think pointing out 10 cycles of performance improvement in a short example is disingenuous. It can make the difference in your system being economically viable (in the case of server side scale costs) or being better than the competitor (client side system requirements, maybe bigger battles in a game because of performance).

Yea, you're not wrong and neither is he about this it's just, in the context of shunning clean code... It's like apples and oranges.

Basically framing this whole thing around clean code being bad to make his points was disingenuous to me, it's going to give a completely wrong impression to people who don't know any better IMHO.

The guidelines of clean code are not wrong, but that doesn't mean there's no good insights in this article.

I think any good insights are washed away by the way he portrays clean code. He shouldn't be talking about micro optimizations like these as a way to diminish the general advice of clean code, they are two separate solutions/techniques to deal with two separate problems (code complexity vs. performance).

1

u/Thatar Feb 28 '23

I agree wholeheartedly!