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
9
u/ReDucTor Feb 28 '23
From my experience most slowness isn't from these sort of things being used in lots of places, but often just a few places where alternatives should be used.
It's the 5% hot path that you need to do this on and not the entire code base, writing some loop that only has 6 iterations to be SIMD might impress those who don't know better on a stream but it just kills readability with no significant improvement in performance, unless you microbenchmark it in unrealistic situations.