Clarity is the most important thing!

尹善
2023-12-01

I strongly agree with this guy's comments on the performance of 'for' vs. 'foreach'. We made too much meaningless microoptimization.

In my code, I find that the most important thing for me to focus on is clarity.  Writing clear code gives me the best chance of ever getting correctness, good performance, maintainability, and flexibility for future requirements.

If I try to directly build any of those, the loss of clarity means that I lose in all of them.

Regarding your specific situation, I would write the clearest way possible, then measure the real-world performance of my app, and then optimize where it matters.

http://blogs.msdn.com/jaybaz_ms/archive/2004/12/23/331474.aspx

转载于:https://www.cnblogs.com/jme/archive/2004/12/24/81591.html

 类似资料:

相关阅读

相关文章

相关问答