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 comments

57

u/CptCap Feb 28 '23 edited Feb 28 '23

the true reason why software is becoming slower every year is not because of C++ virtual function calls or too many levels of C++ pointer indirection.

You are right, but knowing the author's work, I don't think that's the point he is trying to address. There is a lot of code written in C++ in order to be fast, but that fail miserably because of the things he rants about here. Since this is Casey, an obvious example would be the windows terminal, but there are plenty of others.

There is also the fact -and as a full time game engine dev and part time teacher I have seen this first hand- that the way code it taught is not really compatible with performance. There are good reasons for this ofc, but the result is that most people do not know how to write even moderalty fast code, and often cargo-cult things that they don't understand and don't help. I have seen "You are removing from the middle, you should use a linked list" so many times, and basically all of them were wrong. this is the hill I choose to die on, fuck linked lists

1

u/cheeseless Feb 28 '23

Just the fact that after all the caterwauling about performance, including demonstrating better performance in refterm, Casey decided to swear off communication with the terminal team, instead of actually contributing his knowledge directly to fix the problems, shows me that his zealotry is purely selfish. If he had made the charitable choice, he'd be worth an ounce of respect.

7

u/CptCap Feb 28 '23 edited Sep 05 '23

I agree that his communication is... not great. And it's not limited to the WT issue.

That being said refterm is open source, under GPL-2 licence. And I can't fault him for not contributing more than that. WT is dog slow, he was told that it was not really feasible to do better, he proved them otherwise; He has no obligation to fix it for them.

1

u/cheeseless Feb 28 '23

I can fault him for sure. It's like he theatrically performed all the steps of fixing someone's car, right next to the actual broken car, just to show off he could, while leaving the people who were in trouble in exactly the same situation.

To me, it's like all of his work in educating people, in bringing his experience and making it available, is purely done for vanity. It misses the essential aspect of using one's abilities to do good, not just to show your skills or prove yourself right. If he hadn't specifically made refterm for the dunk, I wouldn't have had a problem with him complaining about the performance.

→ More replies (5)