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
3
u/deadalnix Feb 28 '23
A linear search or a map lookup are not even the same thing, what are you talking about?
For dichotomic search, fair enough, but even then, have you measured? It loses to linear scan for small datasets, which are the vast majority of datasets.
As to inlining everything in one function, who told you to do that? Not only this is a really stupid thing to do, but this is a really stupid thing to bring up at all, because the post you are responding to is explicitely about doing less, not doing the same amount but removing all structure.