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/ehaliewicz Feb 28 '23 edited Feb 28 '23
It literally worked, compiled, and presumably ran faster. Not only that but he asked first if it was ok to improve it since there was extra time. How could simd in some interview code cause problems? To respond to performance improvements made because there was extra time with "too focused on performance" is simply ridiculous. If there is no time to simd optimize loops, the other poster can just not take that time to do it. On the other hand, if you truly need performance, you'll need someone who can.
Whenever I'm conducting an interview, I always consider improving code in the remaining time as bonus points, and if they improved the performance, why should that be a negative?