@deanjo. i can't believe you're actually arguing this point. No one is saying it's not sometimes worth it - of course it is. And certain code can be optimized while leaving it quite maintainable. But there's undeniably a strong correlation between optimizing code and making it less maintainable. You can do lots of stuff like leaving comments to try and mitigate that issue, but it's still there.
Check out this code here - http://www.virtualdub.org/blog/pivot...hp?id=307#body
Now compare that with the non-optimized version that would simply be written in C. Are you seriously going to argue that the assembly version is easier to adjust? That a low-paid kid straight out of college would be able to instantly understand everything that's going on in the assembly version to adjust it? That he wouldn't accidentally stick in a PALIGNR instead of using the MOVSS + SHUFPS, thereby causing a performance regression on some systems (while speeding up other), and that he would immediately notice this happening?



Reply With Quote
Besides, since the overall consistency of logic was given up for performance, this kind of optimized result will be much harder to maintain in long time scope - it will require more input, more understanding, more time for same changes compared to understandable version. This is main reason optimization has being issued least importance nowadays, with focus on clean code and letting opt-compiler and profiler do the job on end-result.
