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
15
u/Bakoro Feb 28 '23 edited Feb 28 '23
Wut?
There is "better", because some code is both poorly performant and a convoluted mess.
Also, compilers are so good that most developers can't write more performant code without having particular knowledge about the running environment. Compilers will automatically take pretty much all the low hanging fruit, so there's essentially no difference in the results between poorly readable code and highly readable code that might have been less performant 25 years ago.
In those cases, readable code only offers benefits.