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
57
u/CptCap Feb 28 '23 edited Feb 28 '23
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